topostats.run_topostats#

Run TopoStats

This provides an entry point for running TopoStats as a command line programme.

Attributes#

Functions#

create_parser(→ argparse.ArgumentParser)

Create a parser for reading options.

process_scan(→ None)

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

main()

Run processing.

Module Contents#

topostats.run_topostats.LOGGER#
topostats.run_topostats.create_parser() argparse.ArgumentParser#

Create a parser for reading options.

topostats.run_topostats.process_scan(image_path: str | pathlib.Path, base_dir: str | pathlib.Path, loading_config: dict, filter_config: dict, grains_config: dict, grainstats_config: dict, dnatracing_config: dict, plotting_config: dict, output_dir: 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.

  • base_dir (Union[str, Path]) – Directory to recursively search for files, if not specified the current directory is scanned.

  • loading_config (dict) – Dictionary of configuration options for running the Load Scan stage.

  • filter_config (dict) – Dictionary of configuration options for running the Filter stage.

  • grains_config (dict) – Dictionary of configuration options for running the Grain detection stage.

  • grainstats_config (dict) – Dictionary of configuration options for running the Grain Statistics stage.

  • dnatracing_config (dict) – Dictionary of configuration options for running the DNA Tracing stage.

  • plotting_config (dict) – Dictionary of configuration options for plotting figures.

  • output_dir (Union[str, Path]) – Directory to save output to, it will be created if it does not exist. If it already exists then it is possible that output will be over-written.

topostats.run_topostats.main()#

Run processing.