ginga icon indicating copy to clipboard operation
ginga copied to clipboard

Feature Request: Draw shape based on iso-flux contours

Open pllim opened this issue 8 years ago • 6 comments

As requested by Elena Sacchi in Ginga unconference session in JWST Data Analysis Workshop II, it would be nice to draw a shape based on some iso-flux contour.

pllim avatar Nov 09 '16 21:11 pllim

Note: This might overlap a bit with imexam functionality. Maybe we should wait to see how that imexam plugin works out first (c/c @sosey).

pllim avatar Nov 14 '16 21:11 pllim

I don't think this overlaps too much, but would need to be implemented in both viewers (ginga and ds9). Are you talking about them hand-selecting anything or figuring out the contours based on some other user input and then just drawing? And by shape do you mean an astropy/region?

sosey avatar Nov 14 '16 21:11 sosey

I didn't ask for a lot of details. It was just a single-line question asked during the workshop, which is what was recorded above. Naively, I would assume user wants to draw an irregular shape (in Ginga, it would use some kind of Path object, as Ginga has not yet adopted Astropy's region stuff) that follows the selected flux value (maybe +/- certain delta flux). Exactly how that flux is selected (by clicking or entering in a box), I am not sure. I am guessing user would expect something like http://matplotlib.org/examples/pylab_examples/contour_demo.html .

pllim avatar Nov 15 '16 15:11 pllim

This could also possibly be done with an overlay, similar to the Overlays plugin, but confined to some area around the drawing region.

ejeschke avatar Nov 15 '16 20:11 ejeschke

How does matplotlib represent contours internally? As polygons?

Wondering if you could represent a contour as a compound object made up of filled polygons.

ejeschke avatar Nov 15 '16 20:11 ejeschke

Maybe we can go the lazy route and have such a plugin just overlay matplotlib contours somehow?

pllim avatar Nov 15 '16 21:11 pllim