topotracing

Run Topotracing at the command line.

topostats.topotracing.create_parser() argparse.ArgumentParser[source]

Create a parser for reading options.

topostats.topotracing.main()[source]

Run processing.

topostats.topotracing.process_scan(image_path: Optional[Union[str, pathlib.Path]] = None, channel: str = 'Height', amplify_level: float = 1.0, gaussian_size: Union[int, float] = 2, mode: str = 'nearest', threshold_multiplier: Union[int, float] = 1.7, background: float = 0.0, save_plots: bool = True, output_dir: Union[str, pathlib.Path] = 'output') None[source]

Process a single image, filtering, finding grains and calculating their statistics.

Parameters
  • image_path (Union[str, Path]) – Path to image to process.

  • channel (str) – Channel to extract and process, default ‘height’.

  • amplify_level (float) – Level to amplify image prior to processing by.

  • gaussian_size (Union[int, float]) – Minimum grain size in nanometers (nm).

  • mode (str) – Mode for filtering (default is ‘nearest’).

  • threshold_multiplier (Union[int, float]) – Factor by which lower threshold is to be scaled prior to masking.

  • background (float) –

  • save_plots (bool) – Flag as to whether to save plots to PNG files.

  • output_dir (Union[str, Path]) – Path to output directory for saving results.

Examples

from topostats.topotracing import process_scan

process_scan(image_path=’minicircle.spm’,

save_plots=True, output_dir=’output/’)