runner#
Base class for intermediate processing stages.
A processor takes raw acquisition files and produces derived files. The runner handles the boilerplate: hashing inputs, locating the upstream AcquisitionManifest, writing a ProcessingManifest sidecar alongside the outputs, and turning declared outputs into ProducerEntry shapes the ingest layer can consume.
Typical use:
from mesofield.processing import ProcessorRunner
- class SpikeSorter(ProcessorRunner):
tool_name = “my_lab_spikesort” tool_version = “0.1.0”
- def run(self, inputs, *, sigma=4.0):
in_path = inputs[0] out = in_path.parent / “spikes.csv” # … do the work; write to out … return [out]
runner = SpikeSorter() runner([recording_path], sigma=5.0) # → spikes.csv written, plus my_lab_spikesort.process.json next to it
- class mesofield.processing.runner.ProcessorRunner[source]#
Bases:
objectWrap a file-to-file transformation in a ProcessingManifest contract.
Subclasses must set
tool_nameandtool_version, and overriderun(). Calling the instance executes the work and writes the sidecar.- manifest_placement: ClassVar[str] = 'output_dir'#
Where the manifest sidecar lands.
"output_dir"writes<tool_name>.process.jsonin the directory of the first output; subclasses can overridemanifest_path()for custom placement.