{ "cells": [ { "cell_type": "markdown", "id": "8b1a9d152f4e1c7f", "metadata": {}, "source": [ "# Planetary surveys\n", "\n", "With `ipyaladin`, you can also display planetary surfaces." ] }, { "cell_type": "code", "execution_count": null, "id": "initial_id", "metadata": {}, "outputs": [], "source": [ "from ipyaladin import Aladin\n", "from astropy.table import Table" ] }, { "cell_type": "markdown", "id": "60b133f13ce59125", "metadata": {}, "source": [ "First, let's create an Aladin Lite widget with the Mars Viking MDIM21 survey." ] }, { "cell_type": "code", "execution_count": null, "id": "85d284fd3f5cc7bd", "metadata": {}, "outputs": [], "source": [ "mars = Aladin(\n", " target=\"159.2135528 -58.6241989\",\n", " survey=\"https://alasky.u-strasbg.fr/Planets/Mars_Viking_MDIM21\",\n", " fov=10,\n", ")\n", "mars" ] }, { "cell_type": "markdown", "id": "35ea9256", "metadata": {}, "source": [ "The target does not return a `SkyCoord` object anymore, since we don't represent the sky here. It is a couple of `Longitude` and `Latitude`." ] }, { "cell_type": "code", "execution_count": null, "id": "43c34b52", "metadata": {}, "outputs": [], "source": [ "mars.target" ] }, { "cell_type": "markdown", "id": "e6f17ff7", "metadata": {}, "source": [ "The WCS are also defined on planetary surfaces (in [Marmo *et.al.* 2018](https://doi.org/10.1029/2018EA000388)). This is why you see a CTYPE starting with `MA` for Mars." ] }, { "cell_type": "code", "execution_count": null, "id": "59bcf84c", "metadata": {}, "outputs": [], "source": [ "mars.wcs" ] }, { "cell_type": "markdown", "id": "34747eb38e0db450", "metadata": {}, "source": [ "Let's change the center of the view to Olympus Mons." ] }, { "cell_type": "code", "execution_count": null, "id": "dbe012440a30b6fe", "metadata": {}, "outputs": [], "source": [ "mars.target = \"Olympus Mons\"" ] }, { "cell_type": "markdown", "id": "879f484a", "metadata": {}, "source": [ "Any name recognized by the [Gazetter of Planetary Nomenclature](https://planetarynames.wr.usgs.gov/Nomenclature) will work. \n", "\n", "We can also add tables:" ] }, { "cell_type": "code", "execution_count": null, "id": "5461264f0485d880", "metadata": {}, "outputs": [], "source": [ "longitudes = [\n", " 226.2,\n", " 70.5,\n", " 250.4,\n", " -59.2,\n", " 147.21,\n", " 316.0,\n", " 32.53,\n", " -112.58,\n", " 298.0,\n", " 30.0,\n", " 70.5,\n", " 280.0,\n", " 87.0,\n", " 117.5,\n", " 350.0,\n", "]\n", "latitudes = [\n", " 18.65,\n", " -42.4,\n", " 40.5,\n", " -13.9,\n", " 25.02,\n", " -49.7,\n", " 70.0,\n", " 1.57,\n", " 25.0,\n", " 19.79,\n", " -42.4,\n", " 45.0,\n", " 12.9,\n", " 46.7,\n", " -45.0,\n", "]\n", "names = [\n", " \"Olympus Mons\",\n", " \"Hellas Planitia\",\n", " \"Alba Mons\",\n", " \"Valles Marineris\",\n", " \"Elysium Mons\",\n", " \"Argyre Basin\",\n", " \"Vastitas Borealis\",\n", " \"Tharsis Montes\",\n", " \"Outflow channels\",\n", " \"Arabia Terra\",\n", " \"Hellas Basin\",\n", " \"Tempe Terra\",\n", " \"Isidis Basin\",\n", " \"Utopia Basin\",\n", " \"Noachis Terra\",\n", "]\n", "\n", "table = Table([longitudes, latitudes, names], names=(\"Longitude\", \"Latitude\", \"Name\"))\n", "mars.add_table(\n", " table, color=\"#67d38d\", source_size=15, shape=\"cross\", name=\"Mars_features\"\n", ")" ] }, { "cell_type": "markdown", "id": "d151ea91", "metadata": {}, "source": [ "Unzoom and look for the other points." ] }, { "cell_type": "markdown", "id": "4af1422b", "metadata": {}, "source": [ "## Surveys of Earth" ] }, { "cell_type": "code", "execution_count": null, "id": "479ddc87", "metadata": {}, "outputs": [], "source": [ "earth = Aladin(\n", " survey=\"CDS/P/Earth/DEM/elevation\",\n", " fov=100,\n", ")\n", "earth" ] }, { "cell_type": "code", "execution_count": null, "id": "983e6c40", "metadata": {}, "outputs": [], "source": [ "earth.target" ] }, { "cell_type": "code", "execution_count": null, "id": "4609cf6b", "metadata": {}, "outputs": [], "source": [ "earth.wcs" ] }, { "cell_type": "code", "execution_count": null, "id": "3b887792", "metadata": {}, "outputs": [], "source": [ "earth.target = \"Strasbourg\" # ipyaladin's home" ] }, { "cell_type": "markdown", "id": "d042bb57", "metadata": {}, "source": [ "Any name recognized by OpenStreetMaps will work." ] } ], "metadata": { "nbsphinx": { "execute": "never" } }, "nbformat": 4, "nbformat_minor": 5 }