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

DM-46239: Add pixelization envelopes for Intersection/UnionRegion #72

Merged
merged 6 commits into from
Oct 23, 2024

Conversation

mwittgen
Copy link
Contributor

@mwittgen mwittgen commented Oct 4, 2024

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

Copy link
Contributor

@erykoff erykoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First: a typo and a leftover flatten. Second: I'm worried that findPixels is recursive, I thought that there was discussion on the ticket that this is bad? (This may be way out of my wheelhouse though).

rsu2 = pixelization.envelope(union2)
self.assertEqual(rsu2, rsu2 | rsu)

# CHeck with intersection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment.

include/lsst/sphgeom/CompoundRegion.h Outdated Show resolved Hide resolved
@mwittgen
Copy link
Contributor Author

Allowing to loop over a flattened structures, we wanted to push to another ticket when it's clearer how to define a better API.

Copy link
Member

@TallJimbo TallJimbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I wish we had an alternative to a getRegions that deep-copies everything just to let Python iterate over it, but given pybind11's inflexibility re unique_ptr vs. shared_ptr holders for the same type, I imagine we're pretty much out of options.

src/PixelFinder.h Outdated Show resolved Hide resolved
@TallJimbo
Copy link
Member

I think we're fine with letting this continue to be a fully recursive implementation and punt flattening that out to a new ticket.

@mwittgen mwittgen force-pushed the tickets/DM-46239 branch 2 times, most recently from 1302ec6 to d7018da Compare October 23, 2024 04:17
@mwittgen mwittgen merged commit fc885e0 into main Oct 23, 2024
17 checks passed
@mwittgen mwittgen deleted the tickets/DM-46239 branch October 23, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants