Skip to content

Commit

Permalink
add sidecar for ipyaladin display
Browse files Browse the repository at this point in the history
  • Loading branch information
ManonMarchand committed Dec 21, 2023
1 parent f99bb06 commit 88f0511
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 8 deletions.
64 changes: 56 additions & 8 deletions content/01-intro-to-python-vizier-and-ipyaladin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install ipyaladin"
"%pip install ipyaladin\n",
"%pip install sidecar"
]
},
{
Expand All @@ -37,9 +38,22 @@
"outputs": [],
"source": [
"from ipyaladin import Aladin\n",
"from sidecar import Sidecar\n",
"from astroquery.vizier import Vizier"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"sidecar = Sidecar(title='aladin')\n",
"aladin = Aladin()\n",
"with sidecar:\n",
" display(aladin)"
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand All @@ -54,29 +68,63 @@
"metadata": {},
"outputs": [],
"source": [
"list_catalogs = Vizier.find_catalogs([\"DESI\", \"legacy\"])"
"list_catalogs = Vizier.find_catalogs([\"DESI\", \"legacy\"])\n",
"[print(catalog, description.description) for catalog, description in list_catalogs.items()];"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The identifier is `VII/192`"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"catalog = \"VII/292\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2. A glimpse at its coverage"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"catalogue_coverage = MOC.from_fits(\n",
" f\"https://cdsarc.cds.unistra.fr/viz-bin/moc/{CATALOGUE}\",\n",
")\n",
"catalogue_coverage"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"The identifier is `II/246`. \n",
"The identifier is `VII/192`. \n",
"\n",
"## 2. Let's query in a cone around a point in the sky\n",
"## 2. Let's query for sources from DESI in a cone around a point in the sky\n",
"\n",
"We'll look at how to do that with the Vizier class in astroquery. This method of using the python built-in help works for any modules! ;)"
"We'll look at how to do that with the Vizier class in astroquery."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"help(Vizier)"
]
"source": []
},
{
"cell_type": "code",
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jupyterlab_miami_nights
ipywidgets>=8.1.1,<9
# Python: ipyevents library for Jupyter notebooks (optional)
ipyevents>=2.0.1
# Sidecar
sidecar>=0.7.0

# Python: plotting libraries (optional)
plotly>=5,<6
Expand Down

0 comments on commit 88f0511

Please sign in to comment.