Skip to content

Add bounding_box and crop methods to FlatSkyMap class#226

Merged
arahlin merged 12 commits into
masterfrom
map_box
Jul 1, 2026
Merged

Add bounding_box and crop methods to FlatSkyMap class#226
arahlin merged 12 commits into
masterfrom
map_box

Conversation

@axf295

@axf295 axf295 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Add this bounding box method to flatskymap objects.

@axf295
axf295 requested a review from arahlin June 30, 2026 16:24

@arahlin arahlin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, one nit.

Comment thread maps/src/FlatSkyMap.cxx Outdated
@arahlin arahlin changed the title add bounding box method to flatskymaps Add bounding_box method to FlatSkyMap class Jun 30, 2026
Comment thread maps/src/FlatSkyMap.cxx Outdated
}

std::vector<int>
FlatSkyMap::BoundingBox(double pad) const

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perhaps also pad should be in pixels instead of angular units? That seems more intuitive to me.

Comment thread maps/src/FlatSkyMap.cxx Outdated
Comment thread maps/src/FlatSkyMap.cxx Outdated
Allen Foster and others added 9 commits June 30, 2026 12:23
ssize_t to front of line

Co-authored-by: Alexandra Rahlin <arahlin@users.noreply.github.com>
Co-authored-by: Alexandra Rahlin <arahlin@users.noreply.github.com>
* bounding_box method should return a python tuple of integers, because size_t
  vectors aren't handled well as return values.
* crop_to(map) method to crop a map to the same shape as another one
* option copy_data=False crop() method, to just return an empty stub, e.g. for
  use with crop_to()
* cleanup tests and pipeline module to match these changes

@axf295 axf295 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I see what you meant w the crop_to now. yes that is nice.

not sure what a lot of the cpp details you've added mean but user-side it looks good!

@arahlin arahlin changed the title Add bounding_box method to FlatSkyMap class Add bounding_box and crop methods to FlatSkyMap class Jul 1, 2026
@arahlin
arahlin merged commit 04df06e into master Jul 1, 2026
2 checks passed
@arahlin
arahlin deleted the map_box branch July 1, 2026 14:51
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.

2 participants