ess.reflectometry.tools.batch_processor#
- ess.reflectometry.tools.batch_processor(workflow, runs)[source]#
Creates a collection of sciline workflows from the provided runs.
Example:
` :rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~ess.reflectometry.tools.BatchProcessor\
from ess.reflectometry import amor, tools
workflow = amor.AmorWorkflow()
- runs = {
- ‘608’: {
SampleRotationOffset[SampleRun]: sc.scalar(0.05, unit=’deg’), Filename[SampleRun]: “file_608.hdf”,
}, ‘609’: {
SampleRotationOffset[SampleRun]: sc.scalar(0.05, unit=’deg’), Filename[SampleRun]: “file_609.hdf”,
}, ‘610’: {
SampleRotationOffset[SampleRun]: sc.scalar(0.05, unit=’deg’), Filename[SampleRun]: “file_610.hdf”,
}, ‘611’: {
SampleRotationOffset[SampleRun]: sc.scalar(0.05, unit=’deg’), Filename[SampleRun]: “file_611.hdf”,
},
}
batch = tools.batch_processor(workflow, runs)
results = batch.compute(ReflectivityOverQ) ```
Additionally, if a list of filenames is provided for
Filename[SampleRun]
, the events from the files will be concatenated into a single event list before processing.Example:
``` runs = {
- ‘608’: {
Filename[SampleRun]: “file_608.hdf”,
}, ‘609+610’: {
Filename[SampleRun]: [“file_609.hdf”, “file_610.hdf”],
},
}#
- type workflow:
Pipeline
- param workflow:
The sciline workflow used to compute the targets for each of the runs.
- type runs:
- param runs:
The sciline parameters to be used for each run. Should be a mapping where the keys are the names of the runs and the values are mappings of type to value pairs. In addition, if one of the values for
Filename[SampleRun]
is a list or a tuple, then the events from the files will be concatenated into a single event list.