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 indexing errors, add tests #1

Conversation

melanieclarke
Copy link

In testing your changes, I found a couple issues with array handling when combined with the multi-int case and fixed them here:

  • data_shape needs to be a list, since a tuple can't be updated after creation
  • data_overlap needs to get the same dtype as the input data
  • indexing into the overlap array was not working correctly for 3D data, causing a crash when there was a spatial size difference in the rateints files (this issue predates your changes).

I also added some unit tests that I think should cover the various cases of allowed data and background spatial and integration size differences.

Testing the regression test created for spacetelescope#8326 locally, this version passes with no differences in the output FITS files.

@thomaswilliamsastro thomaswilliamsastro merged commit f9265b6 into thomaswilliamsastro:subarray-bkg Sep 30, 2024
8 of 9 checks passed
@thomaswilliamsastro
Copy link
Owner

Great, that looks good to me. I've merged, rebased onto main, and pushed

@melanieclarke melanieclarke deleted the subarray-bkg branch September 30, 2024 19:58
@melanieclarke melanieclarke restored the subarray-bkg branch October 3, 2024 20:23
@melanieclarke melanieclarke deleted the subarray-bkg branch October 3, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants