hst_obstype#

jdaviz.utils.hst_obstype(hdulist)[source]#

Return the HST observation type from the OBSTYPE keyword.

Some HST products share file suffixes/structure between imaging and spectroscopic observations (e.g. STIS sx2/raw, WFC3/IR grism drz), and their per-extension WCS is not always sufficient to distinguish the two. The OBSTYPE keyword is used instead.

Parameters:
hdulistastropy.io.fits.HDUList

The HDUList to inspect.

Returns:
str or None

'imaging' or 'spectroscopic' for HST products with a recognized OBSTYPE, otherwise None (including for non-HST data).