ginga
ginga copied to clipboard
Feature Request: Save the cutout image from Pick plugin
@ejeschke , there is a user who expressed interest to save the cutout image that Pick
plugin generates back out into a FITS file. Is that already possible? If not, any advise on how to fold it into the existing GUI?
If there is even a way to "pop" the cutout image into its own datasrc
buffer, we can just use SaveImage
plugin to save it out. 🤔
The problem is that Pick
is already crowded in the UI and probably in need of some simplification.
Since we are saving the picks in a FITS table in the Report
part, couldn't we just make an option to add the cutout as an image HDU to the same file? Then a bunch of picks would produce a file with a table of the measurements and a series of image HDUs for the images.
The numpy cutout is saved as self.pick_data
after the cutout.
If we tack on the cutouts to existing report file, then we are locked in for FITS output only. Currently, it supports writing out both ASCII and FITS:
https://github.com/ejeschke/ginga/blob/6682ed7b8ec7602c2dc71a71893a7c5703e02cfa/ginga/rv/plugins/Pick.py#L1905-L1906
Ah, good point. We could do one of the following:
- require FITS (seems limiting)
- only save the images as HDUs if the output is already a FITS file
- write the images as HDUs if FITS and separate FITS files if not
I would vote for (3) with one modification -- Save it out to separate FITS no matter what.