load_MAST_calspec

specreduce.calibration_data.load_MAST_calspec(filename: str | Path, cache: bool | Literal['update'] = True, show_progress: bool = False) Spectrum | None[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

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:
filenameFITS 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.

cacheToggle whether downloaded data is cached or not.
show_progressToggle whether download progress bar is shown.
Returns:
spectrumIf the spectrum can be loaded, return it as a Spectrum.

Otherwise return None. The spectral_axis units are Å and the flux units are milli-Janskys.