ginga icon indicating copy to clipboard operation
ginga copied to clipboard

Feature Request: Save the cutout image from Pick plugin

Open pllim opened this issue 6 years ago • 5 comments

@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. 🤔

pllim avatar Feb 27 '19 03:02 pllim

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.

ejeschke avatar Feb 27 '19 04:02 ejeschke

The numpy cutout is saved as self.pick_data after the cutout.

ejeschke avatar Feb 27 '19 04:02 ejeschke

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

pllim avatar Feb 27 '19 04:02 pllim

Ah, good point. We could do one of the following:

  1. require FITS (seems limiting)
  2. only save the images as HDUs if the output is already a FITS file
  3. write the images as HDUs if FITS and separate FITS files if not

ejeschke avatar Feb 27 '19 05:02 ejeschke

I would vote for (3) with one modification -- Save it out to separate FITS no matter what.

pllim avatar Feb 27 '19 18:02 pllim