Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DraftMASTDOCS and version 23.10

 

Panel
borderColor#00617E
borderWidth2

On this page...

Table of Contents

Downloading a Jupyter Notebook from MAST

While viewing data in MAST Jdaviz, you can seamlessly transition to using Jdaviz within a Jupyter notebook in your local environment for deeper analysis. 

Note
titleNotebook dependencies

To successfully run the Jupyter notebook, it requires the jdaviz and astroquery Python packages to be installed locally.

Click the Open Data In dropdown button and select Jupyter, as shown in Figure 1.  An auto-generated Jupyter notebook will be downloaded to your system, with the filename syntax of jdaviz_notebook_[PRODUCT_FILENAME].ipynb.   When run, this notebook will attempt to download the same data product you were viewing in the web, and open it within the Jdaviz Python application. 

Tip

Data need not be from MAST; you can manually download and load compatible data from any source.


Panel
borderColor#00617E
bgColor#E3EEF1
borderWidth2
borderStylesolid
Center

Open Data in Jupyter dropdown menu


Figure 1 — Dropdown menu with the option to download a Jupyter notebook that will download and load the data product into a local Jdaviz application 

Running the Notebook

When you open the notebook, you will see something similar to Figure 2.  The top notebook cell contains a brief description of the notebook, listing the data product file that it's written to work with and some instructions on python package dependency installations.  There are four auto-generated code cells, that:

  1. Import the necessary Python packages
  2. Attempt to authenticate your user and download the data product using Astroquery
  3. Construct the local filepath to the downloaded data product
  4. Load the data product within the recommended Jdaviz configuration

For some examples of what can be done with Jdaviz in Jupyter, be sure to check out the notebooks repository dedicated to exactly that.

Panel
borderColor#00617E
bgColor#E3EEF1
borderWidth2
borderStylesolid
Center

Example Jupyter Notebook with data from a Cubeviz fileImage Modified

Figure 2 —

 Example

Example downloaded notebook for a 3d data product, to load into a local Cubeviz configuration

For Further Reading...