-
Notifications
You must be signed in to change notification settings - Fork 3
WorkflowCollection for batch reduction #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
src/ess/reflectometry/tools.py
Outdated
zip(curves.keys(), scaling_factors, strict=True) | ||
) | ||
|
||
if CriticalEdgeKey in wfc.keys(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not super happy about the implementation with the CriticalEdgeKey
...
Suggestions welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this was removed after the most recent refactor.
src/ess/reflectometry/tools.py
Outdated
The sciline workflow used to compute the targets for each of the runs. | ||
runs: | ||
The sciline parameters to be used for each run. | ||
TODO: explain how grouping works depending on the type of `runs`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jokasimr it would be super if you could help me explain here the convention for the runs
, when are event lists combined, and when they represent different angles 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runs
is a sequence of dictionaries. The dictionaries contain sciline domain types and their associated values. The basic idea is that calling the helper is equivalent to, for each dictionary: 1. Copy the workflow, 2. Set the domain types and their values from the dictionary on the workflow, 3. Compute the requested targets.
But there are two additional rules:
If run[Filename[SampleRun]]
is not a string or a path, but a collection of such, then it is interpreted as a list of files that should be combined.
If runs
is a dictionary then the logic is applied to the .values()
of the dictionary, and instead of returning a sequence of results we return a dictionary of results with the same keys as the input
… hood and make its interface more like the Pipeline interface rather than a mix between Pipeline and a dict
This is an alternative to #155 .
Mostly, see #155 (comment) for context and motivation.
I got the Amor notebook to work,
but I still need to fix/implement the unit tests, hence this is a draft for now.But feedback is welcome.
I think some things turned out quite nicely in the notebook; creating some of the figures now appears to be simpler 🙂