get_hst_filter

grizli.utils.get_hst_filter(header)[source]

Get simple filter name out of an HST image header.

ACS has two keywords for the two filter wheels, so just return the non-CLEAR filter. For example,

>>> h = astropy.io.fits.Header()
>>> h['INSTRUME'] = 'ACS'
>>> h['FILTER1'] = 'CLEAR1L'
>>> h['FILTER2'] = 'F814W'
>>> from grizli.utils import get_hst_filter
>>> print(get_hst_filter(h))
F814W
>>> h['FILTER1'] = 'G800L'
>>> h['FILTER2'] = 'CLEAR2L'
>>> print(get_hst_filter(h))
G800L
Parameters:
header : Header

Image header with FILTER or FILTER1,FILTER2,…,FILTERN keywords

Returns:
filter : str