This computes a 2D geoelectric strike angle in degrees. The
routine supports either a single site or many sites. For a
single site a scalar angle is returned. For multiple sites a
pandas.DataFrame is returned with one row per site.
Parameters:
obj (Any) – A single EDI-like object (e.g. EDIFile) or an iterable
of EDI-like objects. Each item must expose a .Z section
of shape (n_freq,2,2) or be convertible to such.
where \(Z'\) is the rotated tensor. The returned
angle is the argmin over a 1 degree grid in 0..179.
The "phase_diff" fallback returns 0 if
median \(\\lvert Z_{xy} \rvert \ge
\lvert Z_{yx} \rvert\), else 90. It is intended for
degraded or sparse data.
This function does not alter data. If you need
deterministic behavior for incomplete arrays, consider
preparing tensors with
pycsamt.site.edit.fill_missing().
Evaluate apparent resistivity at a target frequency.
Computes apparent resistivity for the \(Z_{xy}\) and
\(Z_{yx}\) components at a requested frequency. Works with a
single site or a collection. For a single site, a dict is
returned. For multiple sites, a pandas.DataFrame is returned.
Parameters:
obj (Any) – A single EDI-like object (e.g. EDIFile) or an iterable of
such objects. Each item must expose a .Z section of shape
(n_freq,2,2) and a frequency vector.
If obj is a single site, returns a dictionary with keys
"res_xy", "res_yx", "f_used". If obj is
iterable, returns a DataFrame with columns
station, res_xy, res_yx, f_used.
\[\begin{split}\rho_a = \frac{\lvert Z \rvert^2}
{\mu_0\,2\pi\\,f} ,\end{split}\]
where \(Z\) is the complex impedance for the selected
component, \(\\mu_0\) is the magnetic permeability of free
space, and \(f\) is frequency in Hz.
When how="interp", the function first computes
\(\rho_a\) at all native frequencies, then interpolates the
result to the query frequency using linear interpolation in
frequency. If the frequency vector or impedance is missing,
NaN values are returned.
For each site, this computes the least-squares slope of phase
(degrees) versus \(\log_{10}(f)\) over the requested band.
Two slopes are reported, one for \(Z_{xy}\) and one for
\(Z_{yx}\).
If a single site is provided, a dictionary is returned. If an
iterable of sites is provided, a pandas.DataFrame is
returned with one row per station.
Parameters:
obj (Any) – A single EDI-like object (e.g. EDIFile) or an iterable
of such objects.
band (tuple of float) – Inclusive frequency band as (fmin,fmax) in Hz. The
order does not matter; the function uses the numeric min and
max.
where \(T_x, T_y\) are the complex tipper components. The
result can be returned as per-frequency values or summarized
statistics.
For a single site, returns a dict. For an iterable of sites,
returns a pandas.DataFrame.
Parameters:
obj (Any) – A single EDI-like object (e.g. EDIFile) or an iterable
of such objects. The tipper may be attached as ed.Tip,
ed.T, or ed.TIP and must expose a 2-component array
shaped (n_freq,2) or (n_freq,1,2).
per_freq (bool, optional) – If False (default), return summary statistics
(mean, median, max). If True, return per-frequency
values.
If the site has no tipper section, summary statistics are
NaN and per-frequency mode yields an empty result for that
site. To initialize missing arrays, consider
pycsamt.site.edit.fill_missing() with components=("Tip",).
Frequencies are reported from the site frequency vector. The
function assumes the tipper array and frequency vector are
aligned along their first dimension.