ctdam.proc.workflow module

class ctdam.proc.workflow.Workflow(ds, configuration, auto_run=True)[source]

Bases: object

Runs a couple of processing steps in sequence on one or more CTD data source files.

It can use seabird internal processing modules, as well as custom ones. These can be in the form of independent windows exes or just pure python code. The input data can be .hex, .cnv or python data representations, predominantly CTDData. The input and all module and extra information is stored in a dict that usually will be generated by the settings Configuration module that reads a toml config.

Parameters:
  • configuration (dict | Configuration) – The information necessary to run a processing procedure.

  • auto_run (bool) – Whether to autopilot the whole procedure.

load_config()[source]

Thorough input/format check of the processing configuration, that either stems from a .toml config file, or is a self-build dictionary. Checks for the presence of certain keys, and then, depending on their importance, either fails or sets default values.

check_config_entry(key, default_value)[source]

Handles configuration file entries.

new_file_path(file=PosixPath('.'))[source]

Creates the new output file path.

Takes the file type directory or the given output directory and joins them with the given output name.

Parameters:

file (Path) – The current path to the target file.

Return type:

Path

run()[source]

Performs the processing on all target files.

This is the ‘main’ method of the procedure. All previous methods prepare data for this method to then finally transform the input files into the wanted format. The main purpose of this method is the coordination of the two different forms of processing modules: standalone executables with config files, mainly Sea-Bird processing modules, and python-internal classes that implement the Module interface. The caveats are mainly the switching from one form to the other. This for example results in a in or out parsing of a CnvFile object.

Return type:

Dataset