Skip to content

Commit

Permalink
Closes MizarWeb#2
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Christophe committed Jul 9, 2021
1 parent d6bc83e commit 3408321
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 87 deletions.
16 changes: 1 addition & 15 deletions examples/CRS.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
"cells": [
{
"cell_type": "markdown",
"id": "9d992ac4-7bef-4322-ae33-5936e48a1fbf",
"metadata": {},
"source": [
"# CRS"
]
},
{
"cell_type": "markdown",
"id": "892ddf5e-b164-4630-991b-6783dceca46f",
"metadata": {},
"source": [
"Choosing a Coordinate Reference System (CRS) when creating a `MizarMap` defines the context of the map: a planet or a sky view.\n",
Expand All @@ -21,7 +19,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6641d263-acd2-4b61-93fb-41cb35c7dd46",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -31,7 +28,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "dee685e6-c155-49d5-b591-738bef832c04",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -41,7 +37,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6ad296ed-d4b4-43f1-95e4-f0a32c648fcc",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -51,7 +46,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8c2690f0-dc71-4d44-a0f3-b12f616c789f",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -60,15 +54,13 @@
},
{
"cell_type": "markdown",
"id": "d9f41afe-5b25-48ee-aeb6-6e8f7191ee98",
"metadata": {},
"source": [
"A `MizarMap` is created by defining its `crs` parameter (`CRS.WGS84`, planet Earth by default). Its `context` attribute (read-only) is set to either `'Planet'` or `'Sky'` given the prodived CRS."
]
},
{
"cell_type": "markdown",
"id": "febc91f3-03c9-4eaf-a4b4-8461dda22b2f",
"metadata": {},
"source": [
"## Planet"
Expand All @@ -77,7 +69,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c78bd345-9732-46be-8914-f9929e79abe3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -90,7 +81,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c015fd30-2cf3-465e-b5fc-71cbe4879d97",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -103,7 +93,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "11f24e96-a4be-4b64-b68a-6643d8a00677",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -112,7 +101,6 @@
},
{
"cell_type": "markdown",
"id": "2eaa9ca8-8368-4b88-ad13-1c20a8bfd9f2",
"metadata": {},
"source": [
"# Sky"
Expand All @@ -121,7 +109,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b17804da-e450-45c6-ba69-10894ef10dd2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -134,7 +121,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b441ad63-ef9d-4be6-9277-d2f1215365db",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -158,7 +144,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.13"
"version": "3.8.10"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
51 changes: 7 additions & 44 deletions examples/Intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,9 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ac667fe212f549aa83f465b627266948",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"MizarMap(center=(0.0, 0.0), layers=(WMSLayer(layers='BlueMarble', url='https://regards-pp.cnes.fr/api/v1/hysop…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"import json\n",
"\n",
Expand All @@ -51,7 +36,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -61,7 +46,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -75,24 +60,9 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "57747f1b8c7a442293f58ee94b2c8a5b",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"MizarMap(center=(0.0, 0.0), crs='Equatorial', layers=(HipsLayer(url='http://alasky.unistra.fr/DSS/DSSColor'),)…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"# A 3D Sky view can also be created\n",
"sky = MizarMap(crs=CRS.Equatorial)\n",
Expand All @@ -104,13 +74,6 @@
"# Display the Sky and the Hips layer\n",
"sky"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -129,7 +92,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.8.10"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
34 changes: 6 additions & 28 deletions examples/WMS.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -25,26 +25,11 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "adac32387f9746198c2c4d643be6fa8e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"MizarMap(center=(0.0, 0.0), layers=(WMSLayer(layers='viking', url='http://idoc-wmsmars.ias.u-psud.fr/cgi-bin/m…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"mars = MizarMap(crs=CRS.WGS84)\n",
"wms = WMSLayer(\n",
Expand All @@ -65,7 +50,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -81,7 +66,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -94,13 +79,6 @@
")\n",
"mars.add_layer(themis)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -119,7 +97,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.8.10"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down

0 comments on commit 3408321

Please sign in to comment.