Mondaic
This API reference is not for the latest stable Salvus version.

salvus.modules.near_surface.processing.geophone_response

Functions for computing, removing, and plotting geophone responses.

Functions

compute_geophone_response()

def compute_geophone_response(
    frequencies: numpy.ndarray,
    geophone_frequency: float,
    damping_ratio: float,
    calibration_factor: float,
) -> numpy.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 numpy.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 numpy.ndarray

plot_response()

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

Create a Bode plot of an existing frequency response.

Parameters
  • frequencies numpy.ndarray — Array of frequencies in Hz.
  • response numpy.ndarray — Array of the complex response. One item for each frequency.
  • geophone_frequency Optional[float] — Geophone frequency in Hz. If given, a vertical line will be drawn at that frequency.
  • fig Optional[matplotlib.figure.Figure] — If given, the figure will be used. Useful to plot multiple responses.
  • label Optional[str] — 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.core.trace.Trace,
    geophone_frequency: float,
    calibration_factor: float,
    damping_ratio: float,
    frequency_taper: Optional[Tuple[float, float]] = None,
) -> obspy.core.trace.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.core.trace.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 Optional[Tuple[float, float]] — 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.core.trace.Trace — A new obspy.Trace object with the geophone response being removed.