MOUSE pipeline patterns#
MoDaCor does not currently ship a full production MOUSE pipeline definition in
the repository, but it does already provide a stable MOUSE-oriented workflow
through the quickstart, bundled test data, and the runtime-service mouse
source profile.
Current repo assets#
docs/getting_started/quickstart.mdruns a small MOUSE correction example againsttests/testdata/MOUSE_20250324_1_160_stacked.nxs.src/modacor/server/source_profiles.pydefines themousesource profile used by the runtime service and session CLI.docs/pipeline_operations/runtime_service_api.mdshows a full API lifecycle using a MOUSE-style session.
Typical source set#
The runtime-service mouse profile currently expects:
required:
sample,backgroundoptional:
defaults,intensity_calibration,intensity_calibration_background
For smaller local experiments, the quickstart uses only:
sampleas an HDF/NeXus sourcemetadataas a YAML source containing scalar defaults such as detector dark current
Minimal correction pattern#
The quickstart demonstrates a compact three-step MOUSE-style flow:
PoissonUncertaintiesDivideby frame exposure time from the sample fileSubtracta scalar dark-current estimate from YAML metadata
That pattern is useful when validating a new installation because it exercises:
HDF-backed
IoSourceaccessYAML-backed metadata lookup
unit propagation
pipeline tracing and graph rendering
Example snippet#
steps:
1:
module: PoissonUncertainties
configuration:
with_processing_keys: [sample]
2:
module: Divide
requires_steps: [1]
configuration:
with_processing_keys: [sample]
divisor_source: sample::entry1/instrument/detector00/frame_exposure_time
divisor_units_source: sample::entry1/instrument/detector00/frame_exposure_time@units
3:
module: Subtract
requires_steps: [2]
configuration:
with_processing_keys: [sample]
subtrahend_source: metadata::detector/darkcurrent/value
subtrahend_units_source: metadata::detector/darkcurrent/units
Where to go next#
Use the quickstart if you need a runnable local example.
Use the runtime-service docs if you need session-based orchestration with a
mouseprofile.Use
docs/pipeline_operations/pipeline_basics.mdif you need to explain how sources,ProcessingData, and partial reruns fit together.