Skip to content

Vertically reflect JPK images#129

Merged
ns-rse merged 31 commits intoAFM-SPM:mainfrom
derollins:derollins/verticallyflipped_jpk
Apr 2, 2025
Merged

Vertically reflect JPK images#129
ns-rse merged 31 commits intoAFM-SPM:mainfrom
derollins:derollins/verticallyflipped_jpk

Conversation

@derollins
Copy link
Copy Markdown
Member

As described in issue #126 JPK images are vertically reflected and need to be flipped to correct. This pull request adds the ability of the load_jpk() function to do this correction, with the option flip_image added to set this option.

Additionally, I added error handling to the reading of the TIFF tags but, this made _get_z_scaling() too complicated for pre-commit, so I separated out the tag value reading to another function.

I also corrected a typo in the examples notebook.

@derollins
Copy link
Copy Markdown
Member Author

This is the updated (flipped) output with the same images opened in other data processing software:
flipped_image_tests

Comment thread AFMReader/jpk.py Outdated
Comment thread AFMReader/jpk.py Outdated
Comment thread AFMReader/jpk.py Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 28, 2025

Codecov Report

Attention: Patch coverage is 69.23077% with 8 lines in your changes missing coverage. Please review.

Project coverage is 75.41%. Comparing base (ac9753c) to head (b4370e9).
Report is 53 commits behind head on main.

Files with missing lines Patch % Lines
AFMReader/jpk.py 69.23% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #129      +/-   ##
==========================================
+ Coverage   74.62%   75.41%   +0.78%     
==========================================
  Files           8        9       +1     
  Lines         607      720     +113     
==========================================
+ Hits          453      543      +90     
- Misses        154      177      +23     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@ns-rse ns-rse left a comment

Choose a reason for hiding this comment

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

Thanks @derollins for the PR.

I've one very minor suggestion which I should be able to merge directly here to save the need for you to change and push.

Comment thread AFMReader/jpk.py
Comment thread AFMReader/jpk.py Outdated
@ns-rse ns-rse added the jpk label Apr 2, 2025
@ns-rse ns-rse merged commit 69dd7c8 into AFM-SPM:main Apr 2, 2025
13 checks passed
@derollins derollins deleted the derollins/verticallyflipped_jpk branch April 2, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants