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 process uses.

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.data holds the result and stack.processed["raw"] the original data.

Return type:

AFMImageStack

Raises: