Support for PRZ files with arbitrary dispersion direction - #488
Open
gguzzina wants to merge 2 commits into
Open
Conversation
The Panta Rhei format supports multiple calibrations per each axis. This patch automatically selects them with the same priority used internally by Panta Rhei when exporting.
Panta Rhei supports user selectable dispersion orientation, either according to energy (like usual XPS data) or according to energy loss (the usual convention in EELS). Allow loading correctly both variants
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #488 +/- ##
==========================================
+ Coverage 88.24% 88.25% +0.01%
==========================================
Files 108 108
Lines 12207 12212 +5
Branches 2256 2258 +2
==========================================
+ Hits 10772 10778 +6
Misses 904 904
+ Partials 531 530 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ericpre
reviewed
Mar 7, 2026
| # axis ordered by increasing energy means loss direction to the left | ||
| if meta_data.get("filter.mode") == "EELS" and not meta_data.get( | ||
| "source.flip_geometry" | ||
| ): |
Member
There was a problem hiding this comment.
Can you add a comment explaining what you said in the description of the PR?
| content_type = meta_data.get("content.types") | ||
| calibrations = [] | ||
| for axis in range(data_dimensions): | ||
| calib_key = "device.calib" |
Member
There was a problem hiding this comment.
Can you add a comment explaining when these keys are used in relation to file version and/or features?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Historically Panta Rhei used to store EELS data with an "energy type" dispersion, similar to what is usually done in XPS. Since Panta Rhei 0.23 this behavior is toggleable, and the overwhelming majority of users have switched to "energy loss type" behaviour, coherently with what is normally done in the EELS community.
This is not just a cosmetic change, the energy channels are actually in a different order in the stored files, and this requires a change in the loader.
Progress of the PR
upcoming_changesfolder (seeupcoming_changes/README.rst),docs/readthedocs.org:rosettasciiobuild of this PR