Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: making pip install cells consistent #35

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions tutorials/cloud_access/cloud-access-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ This cell will install them if needed:

```{code-cell} ipython3
# Uncomment the next line to install dependencies if needed.
# !pip install astropy hpgeom pandas pyarrow pyvo>=1.5 s3fs matplotlib
# !pip install astropy hpgeom pandas pyarrow pyvo>=1.5 s3fs matplotlib astroquery
```

## 4. Browse buckets
Expand Down Expand Up @@ -167,9 +167,6 @@ To request that additional datasets be made available in cloud storage, please c

# Irsa.list_collections()

# # If `list_collections` is not found,
# # uncomment the next line to update astroquery, then restart your kernel.
# # !pip install --upgrade --pre astroquery
```

Use PyVO to execute a search for Spitzer SEIP Super Mosaics and find cloud access information:
Expand Down
5 changes: 5 additions & 0 deletions tutorials/cosmodc2/cosmoDC2_TAP_access.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ This tutorial demonstrates how to access the CosmoDC2 Mock V1 catalogs. More inf

These catalogs can be accessed through IRSA's Virtual Ovservatory Table Access Protocol (TAP) service. See https://www.ivoa.net/documents/TAP/ for details on the protocol. This service can be accessed through Python using the PyVO library.

```{code-cell} ipython3
# Uncomment the next line to install dependencies if needed.
# !pip install numpy matplotlib pyvo
```

```{code-cell} ipython3
import pyvo as vo
```
Expand Down
11 changes: 8 additions & 3 deletions tutorials/firefly/NEOWISE_light_curve_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ For documentation on the firefly client visit https://caltech-ipac.github.io/fir
- *firefly_client.plot* for visualizing the light curve in the client
- *astropy.utils.data* for downloading the catalog data via TAP query

```{code-cell} ipython3
# Uncomment the next line to install dependencies if needed.
# !pip install firefly_client astropy
```

```{code-cell} ipython3
from firefly_client import FireflyClient
import firefly_client.plot as ffplt
Expand Down Expand Up @@ -75,7 +80,7 @@ Setup the layout of viewer and TAP search the 'Known Solar System Object Possibl
- We want to search the data through IRSA, which supports TAP querying, and we want it streamed directly to us via a synchronous search: <br>"https://<!---->irsa.ipac.caltech.edu/TAP/sync?"<br><br>
- Next, we want to structure query to only retrieve (558) Carmen data from the NEOWISE-R 'Known Solar System Object Possible Association List' catalog. The table name of the catalog can be found using [IRSAViewer](https://irsa.ipac.caltech.edu/irsaviewer/?__action=layout.showDropDown&view=MultiTableSearchCmd) and clicking the **VO TAP Search** tab and changing the 'Project' to **neowiser**. We query all columns of data and we search the target by its object id, which is its name, and use the 'like' condition to only write (558) with a wildcard: <br>"QUERY=SELECT+*+FROM+neowiser_p1ba_mch+AS+n+WHERE+n.objid+like+'(558)%'"

Construction of the query can be found in the [`IRSA TAP documentation page`](https://irsa.ipac.caltech.edu/docs/program_interface/TAP.html).
Construction of the query can be found in the [`IRSA TAP documentation page`](https://irsa.ipac.caltech.edu/docs/program_interface/TAP.html).

We first add a cell to the layout that will hold the table; this cell is shown at row = 0, col = 0, with width = 4, height = 2. Once the cell is created, we can request the necessary data from the catalog and display the data as a table using the [`show_table`](https://caltech-ipac.github.io/firefly_client/api/firefly_client.FireflyClient.html#firefly_client.FireflyClient.show_table) method.

Expand All @@ -95,7 +100,7 @@ if r['success']:
# if r['success']:
# table_url = ("https://irsa.ipac.caltech.edu/TAP/sync?QUERY=SELECT+*+FROM+neowiser_p1ba_mch+AS+n+WHERE+n.objid+like+'(558)%'")
# tablename = astropy.utils.data.download_file(table_url, timeout=120, cache=True)

# file = fc.upload_file(tablename)
# fc.show_table(file, tbl_id='tableneo', title='558 Carmen Catalog', page_size=50)
```
Expand Down Expand Up @@ -131,7 +136,7 @@ hips_url = 'http://alasky.u-strasbg.fr/AllWISE/RGB-W4-W2-W1'

r = fc.add_cell(2, 2, 2, 2, 'catalog-image', 'target')
if r['success']:
status = fc.show_hips(viewer_id=viewer_id, plot_id='aHipsID1-1', hips_root_url = hips_url,
status = fc.show_hips(viewer_id=viewer_id, plot_id='aHipsID1-1', hips_root_url = hips_url,
Title='HiPS-WISE', WorldPt=target)
```

Expand Down
7 changes: 2 additions & 5 deletions tutorials/firefly/SEDs_in_Firefly.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,12 @@ The packages needed for this notebook are in the `requirements.txt` file. They c
* _firefly_client.FireflyClient_ - Python API to Firefly for displaying tables, images and charts
* _numpy_ - for working with arrays
* _pyvo_ - for queries to Virtual Observatory services at the archives
* _jupytext_ - for working with Markdown notebooks. It must be installed before your Jupyterlab session is started. See [these instructions](https://github.com/NASA-NAVO/navo-workshop/blob/main/00_SETUP.md#8-handling-notebooks-in-myst-markdown-format) for helpful information.

+++

To run the notebook by itself, run the cell below (skip if you already have the requirements installed):

```{code-cell} ipython3
# Install libraries if necessary by uncommenting the following
# !pip install -r requirements.txt
# Uncomment the next line to install dependencies if needed.
# !pip install numpy astropy pyvo firefly_client
```

Call the imports below:
Expand Down
5 changes: 5 additions & 0 deletions tutorials/irsa-sia-examples/sia_2mass_allsky.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ https://irsa.ipac.caltech.edu/docs/program_interface/api_images.html
- *astropy.utils.data* for downloading files
- *astropy.io* to manipulate FITS files

```{code-cell} ipython3
# Uncomment the next line to install dependencies if needed.
# !pip install matplotlib astropy pyvo
```

```{code-cell} ipython3
import pyvo as vo
from astropy.coordinates import SkyCoord
Expand Down
5 changes: 5 additions & 0 deletions tutorials/irsa-sia-examples/sia_allwise_atlas.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ https://irsa.ipac.caltech.edu/docs/program_interface/api_images.html
- *astropy.utils.data* for downloading files
- *astropy.io* to manipulate FITS files

```{code-cell} ipython3
# Uncomment the next line to install dependencies if needed.
# !pip install matplotlib astropy pyvo
```

```{code-cell} ipython3
import pyvo as vo
from astropy.coordinates import SkyCoord
Expand Down
5 changes: 5 additions & 0 deletions tutorials/irsa-sia-examples/sia_cosmos.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ https://irsa.ipac.caltech.edu/docs/program_interface/api_images.html
- *astropy.utils.data* for downloading files
- *astropy.io* to manipulate FITS files

```{code-cell} ipython3
# Uncomment the next line to install dependencies if needed.
# !pip install matplotlib astropy pyvo
```

```{code-cell} ipython3
import pyvo as vo
from astropy.coordinates import SkyCoord
Expand Down
5 changes: 5 additions & 0 deletions tutorials/irsa-sia-examples/siav2_seip.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ https://irsa.ipac.caltech.edu/docs/program_interface/api_images.html
- *astropy.utils.data* for downloading files
- *astropy.io* to manipulate FITS files

```{code-cell} ipython3
# Uncomment the next line to install dependencies if needed.
# !pip install matplotlib astropy pyvo
```

```{code-cell} ipython3
import pyvo as vo
from astropy.coordinates import SkyCoord
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ By the end of this tutorial, you will:
## Install and Import required modules

```{code-cell} ipython3
# Install libraries if necessary by uncommenting the following
# Uncomment the next line to install dependencies if needed.
# !pip install astropy matplotlib numpy pandas pyarrow s3fs scipy
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ By the end of this tutorial, you will learn how to do the following:
## Install and Import required modules

```{code-cell} ipython3
# Install libraries if necessary by uncommenting the following
# Uncomment the next line to install dependencies if needed.
# !pip install astropy numpy s3fs
```

Expand Down
4 changes: 2 additions & 2 deletions tutorials/parquet-catalog-demos/wise-allwise-catalog-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Each method accesses the parquet files a bit differently and is useful for diffe
## Imports

```{code-cell} ipython3
# Uncomment the following if you have missing dependencies.
# !pip install numpy pandas>=1.5.2 pyarrow>=10.0.1 matplotlib hpgeom astropy
# Uncomment the next line to install dependencies if needed.
# !pip install pandas>=1.5.2 pyarrow>=10.0.1 matplotlib hpgeom astropy
```

```{code-cell} ipython3
Expand Down