processing.seabird.step module¶

- class processing.seabird.step.ProcessingStep(module, input_path, xmlcon_path=None, output_path=None, new_name=None, verbose=False)[source]¶
Bases:
object
A representation of a single Seabird processing step.
One instance of this class corresponds to one Seabird processing module and its invocation on one single file.
- Parameters:
module (ProcessingModule :) – The Sea-Bird module to run.
input_path (Path | str :) – The path to the target file.
xmlcon_path (Path | str | None :) – The path to the XMLCON file.
output_path (Path | str | None :) – The path to write the new file to. Default is the same as the input one.
new_name (str | None :) – Option to set a new name to the output file.
verbose (bool :) – Allows to run the module in “window” mode, which gives the option to check and manipulate the modules configuration. Is suppressed by default.
- Return type:
A runnable instance.
- build_new_name(new_name, new_file_suffix)[source]¶
Sets the output file path with all the information given.
- Parameters:
new_name (str | None :) – The optional new output name.
new_file_suffix (str :) – The optional suffix to append to the new output name.
- Return type:
A string representing the new name.
- run_string()[source]¶
Builds the command line command that is used to run the module.
Collects the different bits of information and options and handles them accordingly. Does also consider module specific specialities and the wanted verbosity.
- Return type:
list
- run(command=None, timeout=60)[source]¶
Handles the creation of the command line command.
Is mostly needed to correctly running the Sea-Bird processing modules on a linux system using the wine emulator.
- Parameters:
command (list | None :) – The command to run. If not given, creates it.
- run_process(command, timeout=60)[source]¶
Creates and monitors the execution of the module.
This is done in a separate process, to allow leveraging multi-threading. Does also set a timeout for killing the process after some time.
- Parameters:
command (list :) – The command to run, with all the necessary parameters.
timeout (int :) – The time in seconds to wait for the execution to finish. Kills the process otherwise.