SOFIA Data Analysis Cookbooks

Python package

Aim: These documents provide simple recipes (i.e., descriptions and guided examples) for common data analysis objectives using SOFIA processed data.

Skill level: These are generally written for a graduate student audience. Some of the recipes are Jupyter notebooks designed for a researcher with a working knowledge of the numpy, scipy, matplotlib, and astropy. For more general information on these tools see Jupyter notebooks usage and installation and the Python Data Science Handbook.

Contact us: For questions not addressed in these notebooks or the SOFIA handbooks, please contact us at the

Suggestions: We also encourage you to submit any comments or suggestions on these notebooks through a new Github “Issue”.

Contribute: If you have some code that you think other SOFIA users might be interested in, please contact us!!!

Additional Resources: For additional examples of data analysis of infrared data see the Data Analysis Talks for JWST data.




FORCAST: Basic Photometry

Aim: Aperture photometry using FORCAST imaging data.

Tools: astropy, photutils

FORCAST: Grism Inspection

Aim: Inspection of FORCAST grism data.

Tools: astropy, DS9

FORCAST: Grism Line Analysis

Aim: Basic line fluxes and line fitting of grism data.

Tools: astropy

FORCAST: Grism Custom Extraction

Aim: Extract grism data with a user-defined aperture.

Tools: astropy

HAWC+: Data Inspection

Aim: Basic inspection and analysis.

Tools: astropy

EXES: Data Inspection

Aim: Basic inspection and plotting spectra.

Tools: astropy

EXES: Telluric Correction

Aim: Model and remove atmosphere using PSG model.

EXES: Velocity Calculation

Aim: Estimate velocity shift of spectral lines.

Tools: astropy

GREAT: Data Inspection (Python)

Aim: How to view GREAT spectra.

Tools: astropy

GREAT: Reproject Data to GREAT res.

Aim: Reproject other datasets to GREAT pixel map.

Tools: astropy, reproject

GREAT: Data Visualization

Aim: Visualize GREAT datacubes in 2D and 3D.

Tools: astropy, jdaviz/Cubeviz, Glue



SOFIA: Data Retrieval

Aim: Download SOFIA data through the IRSA.

FORCAST: Photometry (Detailed)

Aim: Detailed description of aperture photometry.

FIFI-LS: Cube Analysis

Aim: Basic cube analysis.


GREAT: Data Inspection (CLASS)

Aim: How to view GREAT spectra.

Tools: CLASS