ccdproc
ccdproc copied to clipboard
Allow FITS writer to write to an existing `HDUList`?
I was reading the ccdproc docs for the first time in the context of APE 6 and hit upon the section on writing particularly to a FITS file.
The to_hdu() method seems potentially useful in its own right, so that's fine. But I wonder if, in addition to writing a CCDData to a new file, the FITS writer could also accept an already open FITS file. That would include options for which HDU to write the data to or to create a new HDU (so basically there are 3 operations: update, insert, or append). I'm not sure what the best default is.
The same idea should pertain to the Table writer for FITS as well--just yesterday I had this question come up. So I'm going to suggest something like this over in Astropy too.