Suppose I get a deep_coadd
image using butler.get()
(and then take a cutout, does not matter). Now I want to save it to a fits
file. cutout.writeFits()
does the job but write a lot of long tables those are not necessary for me, and it makes the fits
file unnecessarily large (up to ~100 MB/cutout sometimes).
- Is there a simple way to use
writeFits
to only writePRIMARY , IMAGE , MASK ,VARIANCE
, not the rest of the HDUs? - If not, what are my other options?
I see a writeFits()
function here
https://pipelines.lsst.io/py-api/lsst.meas.algorithms.writeFits.html#lsst.meas.algorithms.writeFits
Is it the same function as ExposureF.writeFits()
that I used above, or there are multiple functions with the same name?
Feedback: A lot of confusions, it would be helpful to demonstrate in a tutorial how to save the images/cutouts (ExposureF) efficiently!
Thanks in advance.