I was unable to find a way to filter out hdus in a one liner that has the object name as either “FLAT” or “DOME”. If would be rather nice to be able to specify a given keyword twice, or give a list or similar to it.
My current workaround is rather ugly:
from ccdproc import ImageFileCollection
import itertools
image_coll = ImageFileCollection('rawdir')
fl = image_coll.hdus(return_fname=True, object='FLAT’)
do = image_coll.hdus(return_fname=True, object=‘DOME’)
flats = itertools.chain(fl, do)