Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Save the cutout image from Pick plugin #750

Open
pllim opened this issue Feb 27, 2019 · 5 comments
Open

Feature Request: Save the cutout image from Pick plugin #750

pllim opened this issue Feb 27, 2019 · 5 comments
Labels

Comments

@pllim
Copy link
Collaborator

pllim commented Feb 27, 2019

@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 pllim added the plugin label Feb 27, 2019
@ejeschke
Copy link
Owner

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
Copy link
Owner

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

@pllim
Copy link
Collaborator Author

pllim commented Feb 27, 2019

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:

ginga/ginga/rv/plugins/Pick.py

Lines 1905 to 1906 in 6682ed7

if filepath.lower().endswith('.txt'):
fmt = 'ascii.commented_header'

@ejeschke
Copy link
Owner

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

@pllim
Copy link
Collaborator Author

pllim commented Feb 27, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants