pycsamt.emtools.plot#
Functions
|
Plot raw or processed 1-D rho/phase panels by station. |
|
Plot impedance response panels with station-level tipper rows. |
|
|
|
|
|
- pycsamt.emtools.plot.plot_sites_panels(sites, *, components=('xy', 'yx'), quantity='rhoa', x_axis='period', phase_range=(-90.0, 90.0), stations=None, ncols=6, wspace=0.2, hspace=0.08, height_ratio=(2, 1), axes=None, figsize_scale=(2.6, 2.6), colors=None, marker=<object object>, ms=<object object>, lw=<object object>, ls=<object object>, show_error_bars=True, show_legend=False, title_fmt='{station}', ylim_rhoa=None, ylim_phase=None, grid=True, preserve_duplicates=False, recursive=True, on_dup='replace', strict=False, verbose=0)[source]#
- pycsamt.emtools.plot.plot_raw_sites_1d(sites, *, stations=None, components=('xx', 'xy', 'yx', 'yy'), raw=True, force_style=False, control=None, phase_range=None, ncols_groups=3, comp_wspace=0.12, group_hspace=0.25, height_ratio=(2, 1), axes=None, figsize_scale=(4.2, 3.1), colors=None, title_group_fmt='{station}', title_comp_fmt='Z{component}', shared_group_labels=True, label_mode=None, shared_x_label_pad=0.078, x_tick_rotation=None, tick_fontsize=7, show_error_bars=True, show_component_legend=True, ylim_rhoa=None, ylim_phase=None, grid=True, recursive=True, on_dup='replace', strict=False, verbose=0)[source]#
Plot raw or processed 1-D rho/phase panels by station.
The layout mirrors diagnostic raw-data figures used in AMT/MT workflows: every selected station is a group, every component is a column, and each component column contains apparent resistivity above phase. When
raw=Truethe raw-data style frompycsamt.api.style.PYCSAMT_STYLE.rawis used automatically, producing black diagnostic traces unlessforce_style=Trueor explicitcolorsare provided.- Parameters:
sites (Any)
raw (bool)
force_style (bool)
control (Any | None)
ncols_groups (int)
comp_wspace (float)
group_hspace (float)
title_group_fmt (str)
title_comp_fmt (str)
shared_group_labels (bool)
label_mode (str | None)
shared_x_label_pad (float)
x_tick_rotation (float | None)
tick_fontsize (int)
show_error_bars (bool)
show_component_legend (bool)
grid (bool)
recursive (bool)
on_dup (str)
strict (bool)
verbose (int)
- pycsamt.emtools.plot.plot_response_tipper(sites, *, stations=None, components=('xy', 'yx'), tipper_components=('tx', 'ty'), raw=False, force_style=False, control=None, phase_range=None, ncols_groups=3, comp_wspace=0.12, group_hspace=0.32, height_ratios=(2.2, 1.1, 0.75, 0.75), axes=None, figsize_scale=(4.8, 4.6), colors=None, tipper_span_group=False, line_style=None, tipper_line_style=':', label_component_x=True, label_tipper_x=True, title_group_fmt='{station}', title_comp_fmt='Z{component}', shared_group_labels=True, shared_x_label_pad=0.074, x_tick_rotation=0.0, tick_fontsize=7, show_error_bars=True, show_tipper_error_bars=False, show_component_legend=True, show_tipper_legend=True, ylim_rhoa=None, ylim_phase=None, ylim_tipper=(-0.6, 0.6), grid=True, preserve_duplicates=False, recursive=True, on_dup='replace', strict=False, verbose=0)[source]#
Plot impedance response panels with station-level tipper rows.
The figure is designed for MT/AMT quality control where impedance and tipper behaviour must be inspected together. Each station is a group: apparent resistivity and phase are shown per impedance component, while compact \(T_x\) and \(T_y\) panels span the full group width.
- Parameters:
sites (Sites-like) – EDI path, collection of EDI files,
Sitesobject, or iterable accepted bypycsamt.emtools._core.ensure_sites().stations (list of str, optional) – Station names to display. When omitted, all stations are used.
components (tuple of str, default ("xy", "yx")) – Impedance tensor components plotted in the resistivity and phase rows. Values are component keys such as
"xy","yx","xx", or"yy".tipper_components (tuple of str, default ("tx", "ty")) – Tipper components to draw. The usual complete diagnostic uses both
"tx"and"ty".raw (bool, default False) – If
True, impedance response curves use the package raw-data style unlessforce_styleis also true. Tipper real/imaginary curves keep distinct package component colours for readability.force_style (bool, default False) – Use component colours even when
raw=True.control (object, optional) – Plot view control. Defaults to
pycsamt.api.control.PYCSAMT_CONTROL.phase_range (tuple of float or None, optional) – Explicit phase display range. If omitted, the active
control.phasepolicy is used.ncols_groups (int, default 3) – Number of station groups per figure row.
comp_wspace (float) – Spacing inside and between station groups.
group_hspace (float) – Spacing inside and between station groups.
height_ratios (tuple of float, default (2.2, 1.1, 0.75, 0.75)) – Relative heights for rho, phase, Tx, and Ty rows. If only one tipper component is requested, the unused extra ratio is ignored.
figsize_scale (tuple of float, default (4.8, 4.6)) – Width and height multiplier for each station group row/column.
colors (dict, optional) – Optional impedance component colour overrides.
tipper_span_group (bool, default False) – If
True, each tipper row spans all impedance component columns in a station group. IfFalse, Tx and Ty are repeated under each component column, giving a compact grid such asrho/phase/Tx/Tyfor every component.line_style (str or None, optional) – Optional line style override for impedance curves.
tipper_line_style (str or None, default ":") – Optional line style override for real and imaginary tipper curves.
label_component_x (bool, default True) – Put the active x-axis label under each impedance-component stack and under the bottom tipper row.
label_tipper_x (bool, default True) – Put the active x-axis label under each impedance-component stack and under the bottom tipper row.
title_group_fmt (str) – Format strings for station and component labels.
title_comp_fmt (str) – Format strings for station and component labels.
shared_group_labels (bool, default True) – Use group-level rho/phase/tipper labels instead of repeating labels on every small axis.
shared_x_label_pad (float, default 0.074) – Figure-coordinate padding used for shared x labels.
x_tick_rotation (float, default 0) – Rotation for bottom x tick labels.
tick_fontsize (int, default 7) – Tick-label size for compact panels.
show_error_bars (bool) – Toggle impedance and tipper error bars independently.
show_tipper_error_bars (bool) – Toggle impedance and tipper error bars independently.
show_component_legend (bool) – Toggle global legends.
show_tipper_legend (bool) – Toggle global legends.
ylim_rhoa (tuple or None) – Optional y-axis limits.
ylim_phase (tuple or None) – Optional y-axis limits.
ylim_tipper (tuple or None) – Optional y-axis limits.
grid (bool, default True) – Draw light panel grids.
preserve_duplicates (bool, default False) – Preserve repeated in-memory EDI objects instead of normalizing them through
ensure_sites(). This is useful for diagnostic demos or before/after comparisons where two display stations intentionally share the same source station name.recursive (bool) – Forwarded to
pycsamt.emtools._core.ensure_sites().on_dup (str) – Forwarded to
pycsamt.emtools._core.ensure_sites().strict (bool) – Forwarded to
pycsamt.emtools._core.ensure_sites().verbose (int) – Forwarded to
pycsamt.emtools._core.ensure_sites().
- Returns:
The assembled response/tipper figure.
- Return type:
Examples
>>> from pycsamt.emtools.plot import plot_response_tipper >>> fig = plot_response_tipper( ... "data/AMT/TIPPER/HBH03_IMP.edi", ... components=("xy", "yx"), ... )
- pycsamt.emtools.plot.plot_sites_compare(sites, new_sites=None, *, components=('xy', 'yx'), quantity='rhoa', x_axis='period', phase_range=(-90.0, 90.0), stations=None, ncols_groups=3, group_gap=0.35, pair_wspace=0.06, hspace=0.06, height_ratio=(2, 1), axes=None, figsize_scale=(3.0, 3.0), colors=None, marker=<object object>, ms=<object object>, lw=<object object>, ls=<object object>, show_error_bars=True, labels=('raw', 'after'), title_group_fmt='{station}', title_col_fmt='{tag}', show_legend=False, ylim_rhoa=None, ylim_phase=None, grid=True, recursive=True, on_dup='replace', strict=False, verbose=0)[source]#
- Parameters:
- pycsamt.emtools.plot.plot_sites_fit_grid(sites, pred_sites, *, components=('xx', 'xy', 'yx', 'yy'), quantity='rhoa', x_axis='period', phase_range=(-180.0, 180.0), stations=None, ncols_groups=2, comp_wspace=0.1, group_hspace=0.18, height_ratio=(2, 1), axes=None, figsize_scale=(4.0, 3.0), colors_meas=None, color_fit_te=<object object>, color_fit_tm=<object object>, marker=<object object>, ms=<object object>, lw=<object object>, ls_meas=<object object>, lw_fit=2.0, ls_fit='-', show_error_bars=True, show_mode_legend=True, title_group_fmt='{station}', ylim_rhoa=None, ylim_phase=None, grid=True, recursive=True, on_dup='replace', strict=False, verbose=0)[source]#