Repository navigation
Define an ExperimentList class - #63
Draft
jbeilstenedmands wants to merge 7 commits into
Draft
jbeilstenedmands wants to merge 7 commits into
jbeilstenedmands wants to merge 7 commits into
Conversation
for more information, see https://pre-commit.ci
dimitrivlachos
approved these changes
Nov 13, 2026
dimitrivlachos
left a comment
Collaborator
There was a problem hiding this comment.
Looks good! Tests are useful.
This branch has not been deployed
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.
Experiment is simplified - it is a container for the models. These are now stored as shared pointers to instances of the model classes (Beam, Detector etc). But the API for users of the experiment class is still the same, i.e. you get a reference to the underlying object:
A Models struct is defined to help with clean construction.
Also, make the API simpler by only allowing setting of optional models that are discovered during processing e.g. the crystal model. Things like the Beam, Detector are defined at the start by the metadata - these models should therefore be updated by a relevant update method on those objects, if they are subsequently refined.
The ExperimentList class stores a vector of experiments and importantly handles (de)serialization to/from json, which enables it to correctly construct shared models.
I will add some tests for the ExperimentList (de)serialization round trip.