pycsamt.metadata.frequency#

pycsamt.metadata.frequency#

Named frequency band registry for electromagnetic geophysics.

Every EM method is characterised by its operational frequency range. FrequencyBand captures that range, together with period bounds and a rule-of-thumb depth-of-investigation (DOI) estimate based on the skin-depth formula:

δ (m) ≈ 503 √( ρ / f ) (ρ in Ω·m, f in Hz)

The pre-defined registry MT_BANDS covers the eight principal EM methods used in applied geophysics.

Quick start#

from pycsamt.metadata.frequency import MT_BANDS, band_for_frequency, REGISTRY

b = MT_BANDS["AMT"]
print(b.f_min, b.f_max)         # 10.0  100000.0
print(b.period_min, b.period_max)
print(b.doi_range_m(rho=100.0)) # DOI estimate at 100 Ω·m

# generate log-spaced frequencies inside the band
freqs = b.logspace(n=30)

# which bands contain 1 Hz?
matches = band_for_frequency(1.0)

# forward/em1d default
lo, hi = frequency_range("AMT")

Module Attributes

MT_BANDS

Dictionary of all pre-defined frequency bands.

REGISTRY

Global mutable registry — start with MT_BANDS; users can add custom bands.

Functions

band_for_frequency(f[, registry])

Return all bands in the registry that contain f Hz.

doi_estimate(f[, rho])

Return the skin-depth DOI estimate in metres at frequency f.

frequency_range(method[, registry])

Return (f_min, f_max) for a named method or band.

register_band(band)

Add or replace a FrequencyBand in the global registry.

Classes

FrequencyBand(name, label, f_min, f_max, method)

Specification of an EM geophysical frequency band.

class pycsamt.metadata.frequency.FrequencyBand(name, label, f_min, f_max, method, doi_ref_rho=100.0, notes='')[source]#

Bases: object

Specification of an EM geophysical frequency band.

Parameters:
  • name (str) – Short identifier, e.g. "AMT".

  • label (str) – Human-readable name, e.g. "Audio-frequency MT".

  • f_min (float) – Minimum operational frequency in Hz.

  • f_max (float) – Maximum operational frequency in Hz.

  • method (str) – EM acquisition method: "MT", "AMT", "CSAMT", "TEM", "CSEM", etc.

  • doi_ref_rho (float, default 100.0) – Reference resistivity (Ω·m) used to compute DOI estimates via the skin-depth formula.

  • notes (str) – Optional annotation.

  • attributes (Computed)

  • -------------------

  • period_min (float) – Period bounds derived from f_max and f_min.

  • period_max (float) – Period bounds derived from f_max and f_min.

  • n_decades (float) – Number of frequency decades spanned by the band.

Examples

b = MT_BANDS["AMT"]
print(b.f_min, b.f_max)          # 10.0  100000.0
print(b.period_range)            # (1e-5, 0.1) s
print(b.doi_range_m())           # DOI at 100 Ω·m
print(b.doi_range_m(rho=10.0))   # DOI at 10 Ω·m

# log-spaced frequencies
freqs = b.logspace(30)

# test membership
assert 1000.0 in b
name: str#
label: str#
f_min: float#
f_max: float#
method: str#
doi_ref_rho: float = 100.0#
notes: str = ''#
property period_min: float[source]#

Minimum period in seconds (= 1 / f_max).

property period_max: float[source]#

Maximum period in seconds (= 1 / f_min).

property period_range: tuple[float, float][source]#

(period_min, period_max) in seconds.

property frequency_range: tuple[float, float][source]#

(f_min, f_max) in Hz.

property n_decades: float[source]#

Number of frequency decades in the band.

skin_depth_m(f, rho=None)[source]#

Skin depth δ (m) at frequency f and resistivity rho.

Formula: δ ≈ 503.3 √(ρ / f)

Parameters:
  • f (float) – Frequency in Hz.

  • rho (float, optional) – Resistivity in Ω·m; defaults to doi_ref_rho.

Return type:

float

doi_range_m(rho=None)[source]#

Return the (shallow, deep) depth-of-investigation estimate in metres.

Shallow DOI corresponds to f_max; deep DOI to f_min.

Parameters:

rho (float, optional) – Resistivity in Ω·m; defaults to doi_ref_rho.

Return type:

tuple[float, float]

logspace(n=30)[source]#

Return n log-spaced frequencies inside the band (Hz).

Parameters:

n (int, default 30) – Number of frequencies.

Return type:

ndarray

contains(f)[source]#

Return True when f (Hz) lies within the band.

Parameters:

f (float)

Return type:

bool

overlaps(other)[source]#

Return True when self and other share any frequency.

Parameters:

other (FrequencyBand)

Return type:

bool

intersection(other)[source]#

Return the (f_min, f_max) intersection with other, or None.

Parameters:

other (FrequencyBand)

Return type:

tuple[float, float] | None

clip_frequencies(freqs)[source]#

Return only those elements of freqs that lie inside the band.

Parameters:

freqs (Any)

Return type:

ndarray

to_dict()[source]#
Return type:

dict[str, Any]

pycsamt.metadata.frequency.MT_BANDS: dict[str, FrequencyBand] = {'AMT': FrequencyBand('AMT'  10–1e+05 Hz  DOI≈16–1592 m  [AMT]), 'BBMT': FrequencyBand('BBMT'  0.0001–1e+04 Hz  DOI≈50–503300 m  [MT]), 'CSAMT': FrequencyBand('CSAMT'  1–1e+04 Hz  DOI≈50–5033 m  [CSAMT]), 'CSEM': FrequencyBand('CSEM'  0.01–1 Hz  DOI≈5033–50330 m  [CSEM]), 'LAMT': FrequencyBand('LAMT'  1–1e+04 Hz  DOI≈50–5033 m  [AMT]), 'LMT': FrequencyBand('LMT'  1e-05–0.1 Hz  DOI≈15916–1591574 m  [MT]), 'MT': FrequencyBand('MT'  0.0001–1e+03 Hz  DOI≈159–503300 m  [MT]), 'TEM': FrequencyBand('TEM'  0.0001–1e+02 Hz  DOI≈503–503300 m  [TEM])}#

Dictionary of all pre-defined frequency bands.

pycsamt.metadata.frequency.REGISTRY: dict[str, FrequencyBand] = {'AMT': FrequencyBand('AMT'  10–1e+05 Hz  DOI≈16–1592 m  [AMT]), 'BBMT': FrequencyBand('BBMT'  0.0001–1e+04 Hz  DOI≈50–503300 m  [MT]), 'CSAMT': FrequencyBand('CSAMT'  1–1e+04 Hz  DOI≈50–5033 m  [CSAMT]), 'CSEM': FrequencyBand('CSEM'  0.01–1 Hz  DOI≈5033–50330 m  [CSEM]), 'LAMT': FrequencyBand('LAMT'  1–1e+04 Hz  DOI≈50–5033 m  [AMT]), 'LMT': FrequencyBand('LMT'  1e-05–0.1 Hz  DOI≈15916–1591574 m  [MT]), 'MT': FrequencyBand('MT'  0.0001–1e+03 Hz  DOI≈159–503300 m  [MT]), 'TEM': FrequencyBand('TEM'  0.0001–1e+02 Hz  DOI≈503–503300 m  [TEM])}#

Global mutable registry — start with MT_BANDS; users can add custom bands.

pycsamt.metadata.frequency.band_for_frequency(f, registry=None)[source]#

Return all bands in the registry that contain f Hz.

Parameters:
  • f (float) – Query frequency in Hz.

  • registry (dict, optional) – Registry to search; defaults to REGISTRY.

Returns:

Sorted from narrowest to widest (fewest to most decades).

Return type:

list of FrequencyBand

pycsamt.metadata.frequency.frequency_range(method, registry=None)[source]#

Return (f_min, f_max) for a named method or band.

Parameters:
  • method (str) – Band name (e.g. "AMT") or method string (e.g. "CSAMT"). Case-insensitive. When multiple bands share the same method, the union range is returned.

  • registry (dict, optional) – Registry to search; defaults to REGISTRY.

Returns:

(f_min, f_max) in Hz.

Return type:

tuple[float, float]

Raises:

KeyError – When method is not found in any band.

pycsamt.metadata.frequency.register_band(band)[source]#

Add or replace a FrequencyBand in the global registry.

Parameters:

band (FrequencyBand) – The band to register under band.name.

Return type:

None