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 bug in rotation code #64

Merged
merged 3 commits into from
Dec 9, 2024
Merged

Fix bug in rotation code #64

merged 3 commits into from
Dec 9, 2024

Conversation

IgorTatarnikov
Copy link
Member

Before submitting a pull request (PR), please read the contributing guide.

Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Rotating the atlas was not working as expected see the below screenshots:

Adjusting pitch and yaw by 90 degrees resulted in a clipped output that wasn't oriented correctly.

bugged_rotation

What does this PR do?
Changes the order in which the matrices are combined and inverts the matrix before passing it to dask's affine_transform function.

New output:
fixed_rotation

How has this PR been tested?

Added a test that fails on main and passes with the fix.

Is this a breaking change?

No.

Does this PR require an update to the documentation?

No.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The code has been formatted with pre-commit

@IgorTatarnikov IgorTatarnikov requested a review from a team December 9, 2024 14:06
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.00%. Comparing base (693c813) to head (07f944c).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
+ Coverage   81.94%   82.00%   +0.06%     
==========================================
  Files           9        9              
  Lines         587      589       +2     
==========================================
+ Hits          481      483       +2     
  Misses        106      106              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IgorTatarnikov IgorTatarnikov requested review from a team and removed request for a team December 9, 2024 14:06
@alessandrofelder alessandrofelder merged commit e04fb15 into main Dec 9, 2024
23 checks passed
@alessandrofelder alessandrofelder deleted the fix-rotation-bug branch December 9, 2024 17:43
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