Open pllim opened 3 years ago
In principle contours are already possible because they were implemented for cubeviz:
I think this meets requirements 1, 2, and 4 in the list above. I'm not sure what 3 really means compared to say 2. Are there any standard formats for storing contours that we might want to support? Isn't 2 enough?
I think it would be nice to be able to customize the contours a bit to be able to turn the labels on/off and change the colors. I've opened an issue here: https://github.com/glue-viz/glue-jupyter/issues/219
Again, perhaps @PatrickOgle can advise.
The additional desired functionality is to save/load a file containing contour levels or export/load list of contour levels to/from a notebook like this:
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) 7) Save contour levels as a list in a notebook (or to a CSV file): [1, 20, 40, 55, 100.] 8) Load contour levels back into viewer/layer as a list (or from a CSV file).
The point is that we don't want to type in potentially long lists of numbers in the custom contours tool. We also want to capture the list for use elsewhere and on other images.
That makes sense, thanks!
@astrofrog Is there a plan/way to export the contour levels to the notebook?
@PatrickOgle , from what I understood from what you said on 2021-05-25, you do not need to save or load contour from file. You only want to transfer contour in memory (in a given active session) from one image to another; this contour in memory will be lost when the session ends, is that correct?
Brute force obviously doesn't work... 😬
viewer.state.layers[0].contour_lim_helper = viewer.state.layers[1].contour_lim_helper
viewer.state.layers[0].contour_visible = True
Overlay contours on image in viewer. Use cases:
Workflow example: https://github.com/spacetelescope/jdaviz/issues/530#issuecomment-827773703
https://jira.stsci.edu/browse/JDAT-1399