pycsamt.pipeline._output#
Output-directory management for the pyCSAMT pipeline.
OutputDir creates and manages the canonical directory tree produced
by a pipeline run:
<root>/
├── processed/ ← final EDI files (config: processed_subdir)
├── plots/ ← QC figures, one sub-folder per step
│ ├── 01_notch/
│ │ ├── harmonic_waterfall.png
│ │ └── snr_gain_profile.png
│ └── 02_select_band/
│ └── band_microstrips.png
├── pipeline.yaml ← reproduced config for reproducibility
├── report.html
└── summary.txt
The directory is created lazily when OutputDir.setup() is called.
Nothing is written until that point so that a pipeline that only runs in
memory (outdir=None) produces no filesystem side-effects.
Classes
|
Manages the output directory tree for a single pipeline run. |
- class pycsamt.pipeline._output.OutputDir(root, *, api=None)[source]#
Bases:
objectManages the output directory tree for a single pipeline run.
- Parameters:
root (str | Path | None) – Root path. If
None, falls back tooutput_root.api (Any) – A
PipelineAPIConfiginstance. WhenNone, the globalPYCSAMT_PIPEsingleton is used.
- save_figure(fig, fn_name, step_idx, step_name, *, api=None)[source]#
Save fig into the step’s plot sub-directory.
- Parameters:
fig (matplotlib.figure.Figure) – Matplotlib figure to save.
fn_name (str) – Name used as the filename stem (derived from the QC function name).
step_idx (int) – 1-based step position.
step_name (str) – Step label (used for the sub-folder name).
api (Any) – Config override.
- Returns:
The path where the figure was saved, or
Noneon failure.- Return type:
Path or None