Closed pllim closed 2 years ago
@pllim, is this with the current (dev) version of Ginga?
Yes, current dev version I pulled from GitHub today.
How big should the circle normally be relative to the annulus? In the GUI for BadPixCorr
, if I type a number into the box labeled "Radius:" (under "Bad Pix Attributes") and press enter, it shows a green circle of that radius (in addition to the magenta annulus). Is it possible that the field is being initialized to 0 incorrectly?
Yes, obj.radius
returns zero. In your Drawing plugin, it defaults to 1. I don't understand why it does not default to 1 anymore in this plugin. 😿
I see that when I actually drag out a circle instead of just clicking, I get a circle of the desired radius. Not sure why the previous version should have defaulted to 1 with just a click, because it is certainly possible to draw a circle with a radius close to zero.
If change L359 from
self.radius = obj.radius
to
self.radius = max(obj.radius, 1.0)
obj.radius = self.radius
I think the plugin works like you are describing.
PR in #228
When I try the Drawing
plugin, one can easily draw very tiny circles. I think the 1.0 in the 'radius:' box is not meaningful for the drawing operation itself, since the radius is determined by how far you drag the cursor while the button is held. Instead, it changes to the actual radius if you try to edit the object.
Thanks! I'll have a look tomorrow. 🙇♀️
Works fine. Thanks again!
stginga/plugins/BadPixCorr.py
circle drawing acts weird now. To reproduce this problem:Problem: Circle has zero radius. Setting the line below from 0 to 1 has no effect.
https://github.com/spacetelescope/stginga/blob/8d0e3b02e9a0194de57245e8978e7d140b021171/stginga/plugins/BadPixCorr.py#L87
I think
obj.radius
comes back zero even if I try to draw a bigger circle.https://github.com/spacetelescope/stginga/blob/8d0e3b02e9a0194de57245e8978e7d140b021171/stginga/plugins/BadPixCorr.py#L359
Suspect:
cc @ejeschke @kulpster85