Repository navigation
Allow evaluating the ParameterAnalysis model on a finer Q grid - #285
Merged
Merged
Conversation
calculate_model_dataset and plot take an optional Q (sc.Variable) so the model can be drawn on a finer grid than the data. Closes #200. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #285 +/- ##
========================================
Coverage 98.18% 98.19%
========================================
Files 64 64
Lines 6243 6247 +4
Branches 1042 1043 +1
========================================
+ Hits 6130 6134 +4
Misses 59 59
Partials 54 54
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…aset Q must be a 1D sc.Variable with a unit of inverse length. plot checks it up front, so a bad Q is no longer silently ignored when there are no bindings to evaluate. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Replaces the ParameterAnalysis-specific check, so the Q grid follows the same rules as everywhere else: a single dimension named 'Q', a unit convertible to 1/angstrom, and positive values. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Q is validated to have the single dimension 'Q', so the model array can keep dims=['Q'] as before. The comment said data and model are plotted as separate Datasets; they are passed as one dict of DataArrays. Co-Authored-By: Claude Fable 5.2 <[email protected]>
The conflict resolution kept a call to add_x_axis_coord, which #287 replaced with with_x_axis_dim, and applied with_x_axis_dim to the dict of DataArrays instead of to the data and model Datasets. The Q^2 test took #287's assertions, which treat the plotted object as one Dataset. Co-Authored-By: Claude Fable 5.2 <[email protected]>
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.
Closes #200.
Made by Claude, I have not read it carefully myself yet.
ParameterAnalysis.calculate_model_datasetandParameterAnalysis.plottake an optionalQ(sc.Variable), mirroring theenergyargument ofplot_data_and_model. When given, the model is evaluated on that grid (converted to the data's Q unit) instead of the data's Q values.Since data and model can now be on different grids,
plotpasses plopp a dict of DataArrays rather than onesc.Dataset. Works withx_axis='Q^2'too.🤖 Generated with Claude Code