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

Add transformation (world-to-voxel) #5

Merged
merged 5 commits into from
Jun 23, 2023
Merged

Conversation

kaitj
Copy link
Contributor

@kaitj kaitj commented Jun 22, 2023

Proposed changes
Probably the last "small" PR, adding in the transformation from world to voxel coordinates. The affine matrix had to separately constructed by the values generated (to create a valid matrix).

Note: I updated the codecov component names to reflect the paths of the files / modules, should be updated in the next PR if it does not show up in this one.

Types of changes
What types of changes does your code introduce? Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (if none of the other choices apply)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you are unsure about any of the choices, don't hesitate to ask!

  • Changes have been tested to ensure that fix is effective or that a feature works.
  • Changes pass the unit tests
  • Code has been run through the poe quality task
  • I have included necessary documentation or comments (as necessary)
  • Any dependent changes have been merged and published

Notes
All PRs will undergo the unit testing before being reviewed. You may be requested to explain or make additional changes before the PR is accepted.

@kaitj kaitj added the enhancement New feature or request label Jun 22, 2023
@github-actions github-actions bot requested a review from tkkuehn June 22, 2023 13:34
@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Merging #5 (897cef1) into main (0d6cf84) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #5   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         6    +3     
  Lines           83       133   +50     
=========================================
+ Hits            83       133   +50     
Components Coverage Δ
afids_utils/io.py 100.00% <ø> (ø)
afids_utils/transforms.py 100.00% <100.00%> (∅)

- added hypothesis['numpy'] to create numpy arrays for strategies
- add world2voxel function
  - add error checks for invalid combinations
- add test cases
- simplified padding (from original) to apply to just a single voxel
@kaitj kaitj force-pushed the enh/transforms branch 2 times, most recently from fac0999 to f5f2465 Compare June 22, 2023 13:37
@kaitj kaitj changed the title Add transformation Add transformation (world-to-voxel) Jun 22, 2023
Copy link
Contributor

@tkkuehn tkkuehn left a comment

Choose a reason for hiding this comment

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

Fundamentally this looks good, just want to nail down the spec for the transformation function a little and improve some of the testing

afids_utils/tests/strategies.py Show resolved Hide resolved
afids_utils/tests/strategies.py Outdated Show resolved Hide resolved
afids_utils/transforms.py Outdated Show resolved Hide resolved
afids_utils/transforms.py Outdated Show resolved Hide resolved
afids_utils/tests/test_transforms.py Outdated Show resolved Hide resolved
afids_utils/tests/test_transforms.py Outdated Show resolved Hide resolved
@kaitj kaitj force-pushed the enh/transforms branch 2 times, most recently from 55ede7d to eb765a5 Compare June 22, 2023 20:28
@kaitj kaitj requested a review from tkkuehn June 23, 2023 11:44
Copy link
Contributor

@tkkuehn tkkuehn left a comment

Choose a reason for hiding this comment

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

A couple of little things related to the test

afids_utils/tests/strategies.py Outdated Show resolved Hide resolved
afids_utils/tests/test_transforms.py Outdated Show resolved Hide resolved
@kaitj kaitj force-pushed the enh/transforms branch 2 times, most recently from 91088c8 to b4c6070 Compare June 23, 2023 18:39
- generate values to draw from and compose affine transform with for
scaling, rotation and translation components
- permutate though scaling, rotation, and translation matrices to give
more variance in the affine
- also add transforms as a component to codecov
- quality fixes
- rename codecov components to reflect paths
@kaitj kaitj merged commit 2f5285b into afids:main Jun 23, 2023
6 checks passed
@kaitj kaitj deleted the enh/transforms branch June 23, 2023 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants