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

Fix healpix 'auto' tiling #191

Merged
merged 1 commit into from
Nov 7, 2024
Merged

Fix healpix 'auto' tiling #191

merged 1 commit into from
Nov 7, 2024

Conversation

earosenberg
Copy link
Contributor

Addresses #190.
The 'auto' routine for setting the 'Healpix tiling now caps nside_tile to nside.
Add check that nside_tile <= nside in C++. If not it will raise a ValueError that can be passed back to Python instead of failing on a FloatingPointError.

@earosenberg earosenberg requested a review from mhasself November 4, 2024 10:00
Comment on lines 599 to 603
if (nside_tile > nside){
std::ostringstream err;
err << "Invalid nside_tile " << nside_tile << " > nside " << nside;
throw ValueError_exception(err.str());
}
Copy link
Member

Choose a reason for hiding this comment

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

Thanks, just fix the indentation (4-space), and add a space before the {.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks

'auto' nside_tile is capped to nside
Add check that nside_tile <= nside in C++
@mhasself mhasself merged commit 5110238 into master Nov 7, 2024
4 checks passed
@earosenberg earosenberg deleted the fix-tiled-healpix branch November 8, 2024 08:49
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