diff --git a/content/01-intro-to-python-vizier-and-ipyaladin.ipynb b/content/01-intro-to-python-vizier-and-ipyaladin.ipynb index 979a1e3..0f12dfc 100644 --- a/content/01-intro-to-python-vizier-and-ipyaladin.ipynb +++ b/content/01-intro-to-python-vizier-and-ipyaladin.ipynb @@ -5,7 +5,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Add a VO table downloaded from Vizier to an ipyaladin instance" + "# Introduction to ipyaladin" ] }, { @@ -14,8 +14,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install ipyaladin\n", - "%pip install astroquery" + "%pip install ipyaladin" ] }, { @@ -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)" ] }, { @@ -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" ] }, { @@ -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\"])" ] }, {