4.1 Analysis Options for HST Data

HST data can be manipulated with several different software packages. Most software provided and supported by STScI is written in Python. In this section, we introduce a few of the software language options for users to analyze their data. In subsequent sections, we will focus exclusively on Python tools.

As of version 9.0 of this document, we do not include any instructions for using IRAF/PyRAF to analyze HST data. In October 2019, STScI stopped providing support for IRAF/PyRAF. At the time of writing, IRAF is only available as part of PyRAF, which was written in Python 2.7. The end of support for these tools is consistent with the end of support for Python 2 by the Python Software Foundation on January 1, 2020.

Users still using IRAF/PyRAF to analyze HST data, unless having a strongly compelling reason to continue using those tools, are advised to instead use software written in Python 3. The Python 3 versions of analysis tools may contain bug fixes not present in the Python 2 versions, and continued use of Python 2 (i.e., PyRAF) for HST analysis may produce unexpected and undesired results.

Users needing assistance with converting from IRAF/PyRAF may find tutorials available at https://stak-notebooks.readthedocs.io/en/latest/ to be a helpful resource. These examples give specific IRAF task names and show how the same work may be accomplished in Python.

4.1.1 Python

Python is a freely available, general-purpose, dynamically-typed interactive language that provides modules for scientific programming, and is used for astronomical data reduction and analysis. The powerful and flexible nature of Python has led to its adoption in many fields, and thus there exists a large population of Python programmers continuously developing tools.

Python is the preferred programming language for analysis of HST data. The remaining text of this handbook will use only Python in discussion and examples.

In Python, the Astropy project (https://www.astropy.org/) contains many astronomy-specific tools provided with thorough documentation.

4.1.2 Interactive Data Language (IDL)

IDL is an array-based, interactive programming language that provides many numerical analysis and visualization tools. It is typically much easier to develop new analysis and visualization applications and utilities in IDL than in FORTRAN or C. IDL can be obtained from Harris Geospatial Solutions (https://www.harrisgeospatial.com/Software-Technology/IDL), and requires a paid license to use.

4.1.3 FORTRAN and C

For those who wish to write their own FORTRAN or C applications, we recommend using the FITSIO library for reading FITS files (https://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html; note that the C library is called CFITSIO).

4.1.4 Software Support

Some software released by STScI is made available to the community, but unsupported (e.g., Tiny Tim). The HST Help Desk may be unable to help users with questions about unsupported software. Users unsure about if a particular tool is supported should contact the Help Desk for more information and possible recommendations for alternative tools.