playnano.processing.core module¶
Load an AFM file and run a list of processing steps on it.
- playnano.processing.core.process_stack(input_path: Path, channel: str, steps: List[Tuple[str, Dict]]) AFMImageStack[source]¶
Load an AFM file, run a list of processing steps on it and return the stack.
This is what
playnano processuses.- Parameters:
input_path (pathlib.Path) – AFM file, or folder of frame files, to load.
channel (str) – Channel to load, for example
"height_trace".steps (list of tuple of (str, dict)) – Processing steps in order, as
(name, kwargs)pairs, for example[("remove_plane", {}), ("mask_threshold", {"threshold": 1.0})]. A name can be any filter, mask, video processing or stack edit step;"clear"clears the current mask.
- Returns:
The processed stack.
stack.dataholds the result andstack.processed["raw"]the original data.- Return type:
- Raises:
LoadError – If the file cannot be loaded.
ValueError – If a step name is not recognised.
See also
playnano.processing.pipeline.ProcessingPipelineRuns the steps.