load_MAST_calspec

specreduce.calibration_data.load_MAST_calspec(filename, cache=True, show_progress=False)[source]

Load a standard star spectrum from the calspec database at MAST. These spectra are provided in FITS format and are described in detail at:

https://www.stsci.edu/hst/instrumentation/reference-data-for-calibration-and-tools/astronomical-catalogs/calspec # noqa

If remote is True, the spectrum will be downloaded from MAST. Set remote to False to load a local file.

Note

This function requires synphot to be installed separately.

Parameters:
filenamestr

FITS filename of a standard star spectrum, e.g. g191b2b_005.fits. If this is a local file, it will be loaded. If not, then a download from MAST will be attempted.

cachebool (default = True)

Toggle whether downloaded data is cached or not.

show_progressbool (default = True)

Toggle whether download progress bar is shown.

Returns:
spectrumSpectrum1D or None

If the spectrum can be loaded, return it as a Spectrum1D. Otherwise return None. The spectral_axis units are Å and the flux units are milli-Janskys.