asldro package

Subpackages

Submodules

asldro.cli module

Command line interface (CLI) for the ASL DRO

class asldro.cli.DirType(should_exist: bool = False)

Bases: object

A directory checker. Will determine if the input is a directory and optionally, whether it exists

class asldro.cli.FileType(extensions: List[str] = None, should_exist: bool = False)

Bases: object

A file checker. Will determine if the input is a valid file name (or path) and optionally, whether it has a particular extension and/or exists

class asldro.cli.HrgtType

Bases: object

A HRGT string checker. Will determine if the input is a valid HRGT string label.

asldro.cli.generate(args)

Parses the ‘generate’ subcommand. :param args: the command line arguments. May optionally contain a ‘params’ value, which will be JSON filename to load for the model inputs (will use default if not present). Must contain ‘output’ which will contain the filename of a .zip or .tar.gz archive.

asldro.cli.main()

Main function for the Command Line Interface. Provides multiple options which are best documented by running the command line tool with –help

asldro.cli.output_hrgt(args)

Parses the ‘output hrgt’ subcommand. Must have a ‘hrgt’ which must be the string identifier of the hrgt and ‘output_dir’ parameter which is the directory to output to.

asldro.cli.output_params(args)

Parses the ‘output params’ subcommand. Must have a ‘output’ parameter which is the filename to a JSON to which the default model parameters will be written

asldro.definitions module

Global module definitions

asldro.examples module

Examples of filter chains

asldro.examples.run_full_pipeline(input_params: dict = None, output_filename: str = None)

A function that runs the entire DRO pipeline. This can be extended as more functionality is included. This function is deliberately verbose to explain the operation, inputs and outputs of individual filters. :param input_params: The input parameter dictionary. If None, the defaults will be used :param output_filename: The output filename. Must be an zip/tar.gz archive. If None, no files will be generated.

Module contents

asldro init