Tutorial notebooks on using the Firefly Python client (and Jupyter Lab extension) to visualize astronomical data as images, tables, charts, and more!
If you don't have the following installed already,
- miniconda: Install by following the steps at https://docs.anaconda.com/miniconda/install/#quick-command-line-install
- git: Install from https://git-scm.com/downloads
Note: If you're using Windows, it is highly recommended to use Windows Subsystem for Linux (WSL) for fewer installation headaches.
-
Clone this repository on your machine:
git clone https://github.com/Caltech-IPAC/firefly-workshop cd firefly-workshop
-
Create Python environment with all the necessary dependencies including Firefly Python client and Jupyter Lab extension:
conda env create --file environment.yml conda activate firefly-py-env
The name of the new conda environment created above should be displayed next to the terminal prompt:
(firefly-py-env)
-
Set the environment variable for Firefly server to let the Firefly Jupyter Lab extension know which server to talk to from the Python client. We use a public Firefly server - IRSA Viewer:
export FIREFLY_URL=https://irsa.ipac.caltech.edu/irsaviewer
-
Open the repository in Jupyter Lab:
jupyter lab
Once you have completed the setup instructions above, you are ready to visualise your data files from Jupyter Lab in Firefly using the Firefly Python client (firefly_client package).
Go through the Reference notebook present in this repository
to learn how to use different capabilities of firefly_client
.
The following is a condensed list of all the pages in firefly_client's documentation website that are most relevant for this workshop:
- FireflyClient API reference: You can use "Methods Summary" table to navigate to learn about the function you are interested in and its parameters.
- Displaying Images using Firefly client
- Visualizing Tables and Catalogs using Firefly client
- Visualizing ds9-style Regions using Firefly client
- Making Plots using Firefly client
We have 3 notebooks demonstrating how to visualize astronomical data from Python using Firefly in exercises directory:
- Using Firefly to Explore OpenUniverse2024 Data Preview Simulated Roman and Rubin Images
- Using Firefly visualization tools in Python to vet SEDs
- Using Firefly visualization tools to understand the light curves of Solar System objects
The solutions of the above exercise notebooks are present at Firefly section in IRSA Tutorials website.