Create WISE recipes for processed data
We should have WISE recipes for processed data.
All processed data is essentially:
- Instantiate dependencies from database.
- Instantiate a Recipe object with the desired process parameters.
- Instantiate the desired processed data product with the dependencies and recipe paramete.
- Run
make()
,store()
,commit()
.
# For a given set of deperistedflats and masterdark.
myrecipe = McdImgFlat()
# Should perhaps be moved to the make method.
mymasterextensions = [
MasterFlatExtension(BITPIX=-64, NAXIS=2) for _ in mydetectorlist
]
mymasterflat = MasterFlat(
recipe=myrecipe,
flats=mydepersistedflats,
masterdark=mymasterdark,
extensions=mymasterextensions,
)
mymasterflat.make()
mymasterflat.save_fits()
mymasterflat.store()
mymasterflat.commit()
All processed data follows exactly this structure.
Process parameters can be entered through the Recipe object, but this is a bit awkward and none of the current prototype Python or ESO C recipes actually support process parameters.
The first three ESO Recipes in the FDR pipeline are
- McdDetDepersist to depersist any raw data (might be removed after FDR)
- McdDetDark to create the masterdark
- McdImgFlat to create the masterflat
These first three recipes should be implemented first. There are already C implementations for McdDetDark and McdImgFlat, and these should be used automatically when make()
is called (if installed).
Note that the McdDetDepersist ESO recipe is used to produce various data products, in particular for this exercise, it produces DepersistedDark and DepersistedFlat. It makes sense to only have one recipe that can create both DepersistedDark and DepersistedFlat, because in total there are almost 20 different depersisted image classes. (DepersistedDark and DepersistedFlat will not exist in the final pipeline, but that is not so important for this exercise.)