Orso improvements - #402
Open
rozyczko wants to merge 24 commits into
Open
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #402 +/- ##
===========================================
- Coverage 93.97% 93.58% -0.40%
===========================================
Files 54 54
Lines 5177 5500 +323
===========================================
+ Hits 4865 5147 +282
- Misses 312 353 +41
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
This pull request introduces comprehensive support for ORSO file handling, including both text (
.ort) and binary (.orb, NeXus/HDF5) formats. It also enhances polarization channel detection, experiment import/export, and unit handling, while making several API improvements and deprecations for clarity and maintainability.ORSO file handling and data import/export:
.orb, NeXus/HDF5) files alongside text.ortfiles, with format detection based on content rather than file extension. Binary support requires the neworbextra (h5py).Project.save_experiment_as_orsoserializes experiments and models using the new utility functions, andModel.as_orsonow outputs the ORSO model-language dictionary (slab representation), not the internal dict.Qzin1/nm, lengths innm, SLDs in1/nm^2).Polarization and dataset handling:
dataset_from_datagroupto build aDataSet1Dfrom a loadedDataGroup, preserving the parsed ORSO header for provenance and avoiding redundant parsing.DataGroupobjects and robustly handles multi-dataset files, raising on corrupt ORSO files instead of silently falling back.Resolution and error handling:
nan, and storedPointwiseresolutions remain as variances for round-tripping.API improvements and deprecations:
Project.load_orso_filein favor of explicit data and model loading methods for clarity.