pycsamt.pipeline._registry#
Step registry for the pyCSAMT processing pipeline.
Every processing operation exposed by pycsamt.emtools is described by a
StepSpec entry in STEP_REGISTRY. Each entry carries:
A short code (e.g.
"NR001") and a human name (e.g."notch_powerline") so users can look up steps either way.The module path and function name needed to import the transform lazily (avoiding circular imports at startup).
An optional override_fn for two-phase steps (SS002/SS003) and wrapper steps (NR007) that cannot be described by a single function reference.
A list of (module, fn_name) pairs for QC / diagnostic plot functions that the pipeline calls automatically after each step.
Default parameters merged with any user-supplied overrides.
A
returns_sitesflag:Falsefor diagnostic-only (plot) steps that do not transform the Sites object.
Functions
Return a sorted list of distinct step categories. |
|
|
Return all registered |
|
Return the |
Return a sorted list of all step codes. |
|
Return a sorted list of all step names. |
Classes
|
Immutable descriptor for one pipeline step. |
- class pycsamt.pipeline._registry.StepSpec(code, name, label, category, defaults=<factory>, returns_sites=True, mod=None, fn_name=None, qc_defs=<factory>, override_fn=None)[source]#
Bases:
objectImmutable descriptor for one pipeline step.
- Parameters:
code (str) – Short uppercase identifier, e.g.
"NR001".name (str) – Snake-case name, e.g.
"notch_powerline".label (str) – Human-readable label shown in pipeline
__repr__.category (str) – Logical group (
"frequency","noise_removal","static_shift","tensor","dimensionality","skew","source_effects","qc").defaults (dict) – Keyword arguments passed to the transform function when not overridden by the user.
returns_sites (bool) –
True– step transforms the Sites object (default).False– diagnostic-only step; the Sites pass through unchanged.mod (str | None) – Dotted module path for the primary transform function.
Nonewhen override_fn is provided.fn_name (str | None) – Name of the transform function inside mod.
Nonewhen override_fn is provided.qc_defs (list[tuple[str, str]]) – List of
(module_path, function_name)pairs. The pipeline calls these after each step to generate QC figures.override_fn (Callable | None) – Direct callable override. When set, mod / fn_name are ignored.
- pycsamt.pipeline._registry.list_steps(category=None)[source]#
Return all registered
StepSpecobjects, optionally filtered.