Skip to content

Commit

Permalink
edit first notebook: astroquery works in dev version
Browse files Browse the repository at this point in the history
  • Loading branch information
ManonMarchand committed Dec 21, 2023
1 parent 62096d6 commit f99bb06
Showing 1 changed file with 13 additions and 29 deletions.
42 changes: 13 additions & 29 deletions content/01-intro-to-python-vizier-and-ipyaladin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Add a VO table downloaded from Vizier to an ipyaladin instance"
"# Introduction to ipyaladin"
]
},
{
Expand All @@ -14,8 +14,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install ipyaladin\n",
"%pip install astroquery"
"%pip install ipyaladin"
]
},
{
Expand All @@ -24,23 +23,11 @@
"metadata": {},
"outputs": [],
"source": [
"import pickle\n",
"\n",
"import astropy.units as u\n",
"\n",
"from ipyaladin import Aladin\n",
"from astroquery.vizier import Vizier\n",
"from astropy.io.votable import parse_single_table"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1. Let's find the catalog identifier of 2Mass in Vizier\n",
"\n",
"To do so, first thing is to inspect the astroquery.vizier python module"
"import micropip, http.client, pyodide_http\n",
"await micropip.install([\"ssl\",\"https://files.pythonhosted.org/packages/c3/c8/d74794dff5c6802994d3dfe506d691d9e0ff3e6b2f34df577899685b2617/astroquery-0.4.7.dev9008-py3-none-any.whl\"])\n",
"pyodide_http.patch_all()\n",
"from importlib import reload\n",
"reload(http.client)"
]
},
{
Expand All @@ -49,16 +36,16 @@
"metadata": {},
"outputs": [],
"source": [
"dir(Vizier)"
"from ipyaladin import Aladin\n",
"from astroquery.vizier import Vizier"
]
},
{
"cell_type": "code",
"execution_count": null,
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": [
"help(Vizier.find_catalogs)"
"## 1. Let's find the catalog identifier of DESI legacy survey in Vizier"
]
},
{
Expand All @@ -67,10 +54,7 @@
"metadata": {},
"outputs": [],
"source": [
"# list_catalogs = Vizier.find_catalogs([\"2Mass\", \"All-Sky\"])\n",
"with open(\"data/list_catalogs.pkl\", \"rb\") as file:\n",
" list_catalogs = pickle.load(file)\n",
"list_catalogs"
"list_catalogs = Vizier.find_catalogs([\"DESI\", \"legacy\"])"
]
},
{
Expand Down

0 comments on commit f99bb06

Please sign in to comment.