Skip to content
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

rectangle region should support mode='exact' #404

Open
pllim opened this issue Oct 26, 2021 · 1 comment
Open

rectangle region should support mode='exact' #404

pllim opened this issue Oct 26, 2021 · 1 comment

Comments

@pllim
Copy link
Member

pllim commented Oct 26, 2021

This gives NotImplementedError:

>>> rect_region.to_mask(mode='exact')
.../regions/shapes/rectangle.py in to_mask(self, mode, subpixels)
    159             use_exact = 1
    160
--> 161         fraction = rectangular_overlap_grid(xmin, xmax, ymin, ymax, nx, ny,
    162                                             self.width, self.height,
    163                                             self.angle.to(u.rad).value,

.../regions/_geometry/rectangular_overlap.pyx in regions._geometry.rectangular_overlap.rectangular_overlap_grid()

NotImplementedError: Exact mode has not been implemented for rectangular apertures

Workaround from @larrybradley for now:

>>> rect_region.to_mask(mode='subpixels', subpixels=32)
@pllim
Copy link
Member Author

pllim commented Oct 26, 2021

Issue 404... 😆 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants