Enable SLD dependence on material data - #403
Open
rozyczko wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #403 +/- ##
===========================================
+ Coverage 94.40% 94.43% +0.03%
===========================================
Files 54 54
Lines 5500 5532 +32
===========================================
+ Hits 5192 5224 +32
Misses 308 308
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 a new feature to the
MaterialDensityclass, allowing the SLD (scattering length density) and ISLD parameters to be decoupled from the chemical formula and density, making them directly editable or fittable. The changes also ensure that serialization and deserialization preserve this decoupling state and the associated manual values.MaterialDensity decoupling and serialization improvements:
sld_coupledproperty and setter to allow toggling whethersld/isldare derived from formula/density or are independent, directly settable parameters. Setting this property updates dependencies and preserves or discards manual values as appropriate.sld_coupledstate and manualsld/isldvalues, ensuring that decoupled/manual values are not lost on save/load. Backward compatibility is maintained for older project files.chemical_structuresetter to also update the molecular weight when the formula changes, preventing mismatches in derived SLD values.