glue-viz / glue-astronomy

Plugin to add astronomy-specific functionality to glue
https://glue-astronomy.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
11 stars 12 forks source link

Region roundtrip: Recreate same region from Glue Subset #30

Open pllim opened 3 years ago

pllim commented 3 years ago

Is your feature request related to a problem? Please describe it:

I can create a Glue Subset from regions or, somewhat surprisingly, also photutils aperture (in a limited way) using the same API. However, I cannot go the other way. Once region is converted to mask and then MaskSubsetState, the original info is lost.

Describe the solution you'd like:

Someway to preserve the info of how the subset was originally created, so we can recreate it. Though this is really hard to do, if we also let user modify the region interactively after creation, which at least currently does not seem possible.

Describe alternatives you've considered:

Tell the POs to accept the fact that this request is not possible and de-scope spacetelescope/jdaviz#622 / spacetelescope/jdaviz#630 .

Additional context:

To satisfy Imviz non-MVP requirements under contract with STScI.

pllim commented 3 years ago

Or maybe I completely misunderstood this requirement: https://github.com/spacetelescope/jdaviz/issues/530#issuecomment-827773703

  1. Load and display image 1
  2. Load and display image 2
  3. Match WCS of image 2 to image 1
  4. Plot contours on image 2
  5. Manually adjust contour levels on image 2
  6. Overplot contours from image 2 on image 1 (using existing mechanism)
astrofrog commented 3 years ago

Over plotting contours can be done currently without the need to use subsets. I'll try and post an example.

pllim commented 3 years ago

Over plotting contours

Whoops... https://github.com/glue-viz/glue-astronomy/issues/30#issuecomment-849094782 was mean for glue-viz/glue-jupyter#231

pllim commented 3 years ago

Back to this issue, @eteq says it is not MVP.