Open wtbarnes opened 4 months ago
Another option would be to store all of the different possible WCS keys in a single header and label them with a different suffix, e.g. CTYPEA
, PCIJB
, etc. Then, a different WCS can be selected from the header upon instantiating the WCS object.
This page has some instructions for building multi-extension FITS files: https://docs.astropy.org/en/stable/generated/examples/io/create-mef.html#sphx-glr-generated-examples-io-create-mef-py
The last step in the pipeline is to stack all of the images into a single array and write it to a FITS file. Currently, only one header is saved to the file which means only one WCS is saved. Instead, all headers should be saved in separate extensions. The following example script does this,
There should also be some step that reads the image data from the first extension and can choose an appropriate extension to grab the metadata from.