Upon reading a FITS file, automatically determine the correct class(es)
The headers of a FITS file contain all the information required to determine which MicadoWISE class it belongs to. However, this is currently broken and should be fixed.
Old approach: the original approach worked identical on all levels. That is, a FITS keyword ending with CLS
would indicate that a specific class was intended. For example, the value of TPL CLS
in a raw file would indicate which subclass of Template should be used as the .template
property of that raw; this worked. A CLS
on the top level could indicate the class of the raw itself (the subclass of the Raw
class), however this was never implemented. No other hierarchical CLS
keywords (e.g. to distinguish between the different relay optics) was implemented.
The old approach fails because
- There is no way in ScopeSIM to add these
CLS
headers. - ESO uses the
ID
header forTPL ID
, so that would be a better choice, but having ScopeSIM add that is difficult.
Currently it is only possible to ingest data by using the right class, e.g. mydark = Dark(filename=myfile.fits)
. However, it should be possible to do just mydark = Raw(filename=myfile.fits)
or something like that.
The proposed approach for raws is:
- Use the DPR.CATG / DPR.TYPE / DPR.TECH keywords to determine the Template class; there is a one-to-one relation.
- Use the Template to determine the Raw class; there is also a one-to-one relation.
- Don't differentiate the other subclasses yet, which essentially means we only support standard imaging wide mode simulations. Discuss with Kieran how to proceed.
The proposed approach for processed data is:
- Use the PRO.CATG header to determine the class. In our design there is a one-to-one mapping, but it is not clear whether MPE will keep such a mapping.