pycsamt.api.pipe#

Pipeline API configuration for pyCSAMT.

class pycsamt.api.pipe.PipelineAPIConfig(output_root='pipe_results', processed_subdir='processed', plots_subdir='plots', on_step_error='warn', save_intermediate=False, show_progress=True, progress_style='bar', repr_width=80, plot_dpi=150, plot_fmt='png', report_formats=<factory>)#

Bases: object

Runtime configuration for the pyCSAMT pipeline engine.

Variables:
  • output_root (str) – Default root directory when no outdir is passed to run().

  • processed_subdir (str) – Sub-directory inside output_root that receives the processed EDI files.

  • plots_subdir (str) – Sub-directory inside output_root that receives all QC figures, organised into one sub-folder per pipeline step.

  • on_step_error (str) – Behaviour when a step raises an exception. "raise" re-raises immediately; "warn" logs a warning and continues with the previous sites; "skip" is silent.

  • save_intermediate (bool) – If True, EDI files are also written after each step (into plots_subdir/<step>/edi_snapshot/).

  • show_progress (bool) – Enable console progress output while the pipeline runs.

  • progress_style (str) – "bar" – tqdm-style progress bar (requires tqdm; falls back to "log" when unavailable). "log" – one line per step. "silent" – no output.

  • repr_width (int) – Character width used when printing the pipeline summary.

  • plot_dpi (int) – DPI for saved figures.

  • plot_fmt (str) – File extension / format for saved figures ("png", "pdf", "svg").

  • report_formats (tuple) – Sequence of report types to write. Each item must be "html" or "txt".

Parameters:
  • output_root (str)

  • processed_subdir (str)

  • plots_subdir (str)

  • on_step_error (str)

  • save_intermediate (bool)

  • show_progress (bool)

  • progress_style (str)

  • repr_width (int)

  • plot_dpi (int)

  • plot_fmt (str)

  • report_formats (tuple)

output_root: str = 'pipe_results'#
processed_subdir: str = 'processed'#
plots_subdir: str = 'plots'#
on_step_error: str = 'warn'#
save_intermediate: bool = False#
show_progress: bool = True#
progress_style: str = 'bar'#
repr_width: int = 80#
plot_dpi: int = 150#
plot_fmt: str = 'png'#
report_formats: tuple#
configure(**kw)#

Set one or more configuration attributes by keyword.

Parameters:

kw (Any)

Return type:

None

context(**kw)#

Temporarily override config values, then restore them.

Parameters:

kw (Any)

Return type:

Generator[PipelineAPIConfig, None, None]

reset()#

Restore all attributes to package defaults.

Return type:

None

clone()#

Return a deep copy of this config.

Return type:

PipelineAPIConfig

pycsamt.api.pipe.configure_pipe(**kw)#

Configure the global PYCSAMT_PIPE singleton.

Parameters:

kw (Any)

Return type:

None

pycsamt.api.pipe.reset_pipe()#

Reset PYCSAMT_PIPE to package defaults.

Return type:

None