-
Notifications
You must be signed in to change notification settings - Fork 38
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
Circle draw tool must produce circle #370
Conversation
I don't think the |
p.s. I tried having both tools subclass from a common base class but that broke the click-and-drag feature for some reason. |
roi = CircularROI(xc=xc, yc=yc, radius=rx) | ||
else: | ||
roi = EllipticalROI(xc=xc, yc=yc, radius_x=rx, radius_y=ry) | ||
r = (rx + ry) * 0.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r = (rx + ry) * 0.5 | |
r = np.sqrt((rx**2 + ry**2) * 0.5) |
adds a little computational overhead, but I think using arithmetic mean here could create a circle passing somewhat besides the actual pointer position
@camipacific's workflow on standalone Jdaviz (read: she ran this stuff on voila)
at this point i was confused and thought i did something wrong so I deleted the subsets and started again. by redoing it, i noticed that the circular subset turned automatically in an ellipse, while the annulus stayed a circular annulus. this can be confusing for a user. |
As per offline discussions, I will wait for the alternative solution that @astrofrog is going to propose. |
This has been superseded by #376 |
User was confused on why they get back elliptical region when they used the circular draw tool on their image. You can basically reproduce this behavior using spacetelescope/jdaviz#697 even though I think @camipacifici reported a different workflow.
With this patch, even though the circle tool obviously produced something that does not look circular in Lab, it still gives a circle.
I don't see the affected code tested anywhere in this repo, so I am unable to add new tests.🐱