Mondaic

salvus.modules.near_surface.processing.geophone_response

salvus.modules.near_surface.processing.geophone_response salvus modules near_surface processing geophone_response

Functions for computing, removing, and plotting geophone responses.

Functions

compute_geophone_response()

def compute_geophone_response(
    frequencies: np.ndarray,
    geophone_frequency: float,
    damping_ratio: float,
    calibration_factor: float,
) -> np.ndarray: ...

Compute the frequency response of a geophone relative to ground velocity.

Assumes a simplified second-order damped spring-mass system that nonetheless should be fairly accurate for many uses.

Parameters
  • frequencies np.ndarray — Frequencies for which to compute the response in Hz.
  • geophone_frequency float — The natural frequency of the geophone in Hz.
  • damping_ratio float — The damping ratio. Between 0 and 1.
  • calibration_factor float — The calibration factor. Usually given as V/m or V/inch. Make sure the units are correct for your application. Salvus computes everything in SI units.
Returns np.ndarray

plot_response()

def plot_response(
    frequencies: np.ndarray,
    response: np.ndarray,
    geophone_frequency: float | None = None,
    fig: matplotlib.figure.Figure | None = None,
    label: str | None = None,
    log_base: int = 2,
) -> matplotlib.figure.Figure: ...

Create a Bode plot of an existing frequency response.

Parameters
  • frequencies np.ndarray — Array of frequencies in Hz.
  • response np.ndarray — Array of the complex response. One item for each frequency.
  • geophone_frequency float | None — Geophone frequency in Hz. If given, a vertical line will be drawn at that frequency.
  • fig matplotlib.figure.Figure | None — If given, the figure will be used. Useful to plot multiple responses.
  • label str | None — Label for the response.
  • log_base int — Base for the logarithmic axes.
Returns matplotlib.figure.Figure

remove_geophone_response()

def remove_geophone_response(
    tr: obspy.Trace,
    geophone_frequency: float,
    calibration_factor: float,
    damping_ratio: float,
    frequency_taper: tuple[float, float] | None = None,
) -> obspy.Trace: ...

Remove the geophone response from a given trace and return a new trace object.

Uses the compute_geophone_response() function to compute the actual response.

Parameters
  • tr obspy.Trace — Trace with the to be corrected data.
  • geophone_frequency float — The natural frequency of the geophone in Hz.
  • calibration_factor float — The calibration factor. Usually given as V/m or V/inch. Make sure the units are correct for your application. Salvus computes everything in SI units.
  • damping_ratio float — The damping ratio. Between 0 and 1.
  • frequency_taper tuple[float, float] | None — Frequency domain taper (bandpass filter) to stabilize the spectral division. Must be given as a tuple of two values: The min and max frequency of the passband. There will be a transition zone between (min/2 - min) and (max - max * 2.0) to go from stop to passband.
Returns obspy.Trace — A new obspy.Trace object with the geophone response being removed.