processing.seabird.routine module¶

- class processing.seabird.routine.ProcessingRoutine(processing_info)[source]¶
Bases:
object
Batch processing of running multiple processing modules in sequence is realised by this class. It also allows batch processing of multiple files at the same time. In order to accomplish that, a very specific input is needed, specified in detail by a configuration .toml file. For that reason, a thorough input check takes place upon initialization.
- Parameters:
processing_info (dict :) – All the information necessary to run a processing routine. Can be built internally in other python code or, more often, will be the input from a .toml configuration file.
- create_modules()[source]¶
Loads the module information into individual module instances.
A module is the representation of one Sea-Bird module of the same name. It stores the path to the executable and a configuration .psa file.
- Return type:
list
[ProcessingModule
]
- create_steps()[source]¶
Creates a list of processing steps from the input information.
A step is the application of one processing module to a target data file, which usually is either .hex or .cnv .
- Return type:
list
[ProcessingStep
]
- find_xmlcon(input_file)[source]¶
Recursively searches for a corresponding .XMLCON file to a given input file.
- Parameters:
input_file (Path :) – The path to the target input file.
- Return type:
A path to the .XMLCON file, or none, if none found.
- start_thread()[source]¶
Starts a separate process to run the processing.
This leverages parallel computing capabilities and allows the targeted killing of the processing, when necessary.
- fill_file_type_dir(file, copy=True)[source]¶
Copies the target input and output files into individual type directories.
A ‘file type directory’ is a directory that is meant to collect all the file of the same file extension that accumulate over multiple processings. For typical Sea-Bird processings you usually end up with something like this:
- root-dir
hex
cnv
XMLCON
btl
bl
hdr
- Parameters:
file (Path :)
copy (bool :) – (Default value = True)