pycsamt.api.control#

Global plotting-view controls for pyCSAMT.

Functions

configure_control(**kw)

Configure PYCSAMT_CONTROL with dotted-path arguments.

reset_control()

Reset PYCSAMT_CONTROL to package defaults.

wrap_phase(phase[, phase_range])

Wrap phase values into phase_range.

Classes

FrequencyAxisControl([view])

Control the 1-D frequency/period axis.

PhaseViewControl([range, unit, wrap])

Control how phase values are wrapped and displayed.

PyCSAMTControl()

Package-wide plotting-view control container.

RhoViewControl([view])

Control apparent-resistivity display scale.

class pycsamt.api.control.FrequencyAxisControl(view='log10_period')[source]#

Bases: object

Control the 1-D frequency/period axis.

Parameters:

view (str)

view: str = 'log10_period'#
transform(freq)[source]#

Return x-axis values from frequency in hertz.

Parameters:

freq (Any)

Return type:

ndarray

label()[source]#

Return the x-axis label.

Return type:

str

use_log_scale()[source]#

Return whether Matplotlib should use log scaling.

Return type:

bool

class pycsamt.api.control.PhaseViewControl(range=(-180.0, 180.0), unit='degree', wrap=True)[source]#

Bases: object

Control how phase values are wrapped and displayed.

Parameters:
range: tuple[float, float] = (-180.0, 180.0)#
unit: str = 'degree'#
wrap: bool = True#
transform(phase)[source]#

Return phase values in the configured display interval.

Parameters:

phase (Any)

Return type:

ndarray

label()[source]#

Return the phase-axis label.

Return type:

str

class pycsamt.api.control.PyCSAMTControl[source]#

Bases: object

Package-wide plotting-view control container.

configure(**kw)[source]#

Configure controls using section__attribute paths.

Parameters:

kw (Any)

Return type:

None

context(**kw)[source]#

Temporarily override controls, then restore them.

Parameters:

kw (Any)

Return type:

Generator[PyCSAMTControl, None, None]

reset()[source]#

Reset controls to package defaults.

Return type:

None

summary()[source]#

Return a human-readable summary.

Return type:

str

class pycsamt.api.control.RhoViewControl(view='log10')[source]#

Bases: object

Control apparent-resistivity display scale.

Parameters:

view (str)

view: str = 'log10'#
transform(rho)[source]#

Return apparent resistivity in the configured display scale.

Parameters:

rho (Any)

Return type:

ndarray

error(rho, rho_err)[source]#

Return display-scale rho errors.

Parameters:
  • rho (Any)

  • rho_err (Any | None)

Return type:

ndarray | None

label()[source]#

Return the apparent-resistivity axis label.

Return type:

str

pycsamt.api.control.configure_control(**kw)[source]#

Configure PYCSAMT_CONTROL with dotted-path arguments.

Parameters:

kw (Any)

Return type:

None

pycsamt.api.control.reset_control()[source]#

Reset PYCSAMT_CONTROL to package defaults.

Return type:

None

pycsamt.api.control.wrap_phase(phase, phase_range=(-180.0, 180.0))[source]#

Wrap phase values into phase_range.

Parameters:
Return type:

ndarray