topostats.run_modules#

Run TopoStats modules.

This provide entry points for running TopoStats as a command line programme. Each function within this module is a wrapper which runs various functions from the ‘’processing’’ module in parallel.

Attributes#

Functions#

_set_logging(→ None)

Set the logging level.

_log_setup(→ None)

Log the current configuration.

_parse_configuration(→ tuple[dict, dict])

Load configurations, validate and check run steps are consistent.

process(→ None)

Find and process all files.

filters(→ None)

Load files from disk and run filtering.

grains(→ None)

Load files from disk and run grain finding.

grainstats(→ None)

Load files from disk and run grainstats.

disordered_tracing(→ None)

Load files from disk and run grainstats.

nodestats(→ None)

Load files from disk and run grainstats.

ordered_tracing(→ None)

Load files from disk and run grainstats.

splining(→ None)

Load files from disk and run grainstats.

bruker_rename(→ None)

Find files old-format Bruker files in the specified directory and append the suffix .spm.

Module Contents#

topostats.run_modules.LOGGER#
topostats.run_modules._set_logging(log_level: str | None) None[source]#

Set the logging level.

Parameters:

log_level (str) – String for the desired log-level.

topostats.run_modules._log_setup(config: dict, args: argparse.Namespace | None, img_files: dict) None[source]#

Log the current configuration.

Parameters:
  • config (dict) – Dictionary of configuration options.

  • args (argparse.Namespace | None) – Arguments function was invoked with.

  • img_files (dict) – Dictionary of image files that have been found.

topostats.run_modules._parse_configuration(args: argparse.Namespace | None = None) tuple[dict, dict][source]#

Load configurations, validate and check run steps are consistent.

Parameters:

args (argparse.Namespace | None) – Arguments.

Returns:

Returns the dictionary of configuration options and a dictionary of image files found on the input path.

Return type:

tuple[dict, dict]

topostats.run_modules.process(args: argparse.Namespace | None = None) None[source]#

Find and process all files.

Parameters:

args (None) – Arguments.

topostats.run_modules.filters(args: argparse.Namespace | None = None) None[source]#

Load files from disk and run filtering.

Parameters:

args (None) – Arguments.

topostats.run_modules.grains(args: argparse.Namespace | None = None) None[source]#

Load files from disk and run grain finding.

Parameters:

args (None) – Arguments.

topostats.run_modules.grainstats(args: argparse.Namespace | None = None) None[source]#

Load files from disk and run grainstats.

Parameters:

args (None) – Arguments.

topostats.run_modules.disordered_tracing(args: argparse.Namespace | None = None) None[source]#

Load files from disk and run grainstats.

Parameters:

args (None) – Arguments.

topostats.run_modules.nodestats(args: argparse.Namespace | None = None) None[source]#

Load files from disk and run grainstats.

Parameters:

args (None) – Arguments.

topostats.run_modules.ordered_tracing(args: argparse.Namespace | None = None) None[source]#

Load files from disk and run grainstats.

Parameters:

args (None) – Arguments.

topostats.run_modules.splining(args: argparse.Namespace | None = None) None[source]#

Load files from disk and run grainstats.

Parameters:

args (None) – Arguments.

topostats.run_modules.bruker_rename(args: argparse.Namespace | None = None) None[source]#

Find files old-format Bruker files in the specified directory and append the suffix .spm.

Parameters:

args (argparse.Namespace | None) – Arguments.