seidart.routines.sourcefunction module

seidart.routines.sourcefunction.broadbandsrc(timevec: ndarray, fmin: float, fmax: float, **kwargs) ndarray

Broadband source: all frequencies in [fmin, fmax] onset simultaneously using a minimum-phase FIR impulse response.

seidart.routines.sourcefunction.double_couple_tensor(strike_deg: float, dip_deg: float, rake_deg: float, M0: float = 1.0) ndarray

Return (Mxx, Myy, Mzz, Mxy, Mxz, Myz) for a unit double-couple (scaled by M0).

seidart.routines.sourcefunction.find_zero_crossing(timevec, wavelet_vals, noise_region=slice(0, 100, None), k=3)

Estimate the first zero crossing of a wavelet after thresholding noise.

Parameters:
  • timevec (numpy.ndarray) – Time vector associated with wavelet_vals.

  • wavelet_vals (numpy.ndarray) – Wavelet amplitude samples.

  • noise_region (slice) – Slice used to estimate background noise.

  • k (float) – Noise multiplier used as the zeroing threshold.

Returns:

Approximate zero-crossing time, or None if no crossing is found.

Return type:

float or None

seidart.routines.sourcefunction.multimodesrc(timevec: ndarray, f: float, stype: str, center: bool = False, num_octaves=3) ndarray

Creates a multi-mode source by combining octave-spaced wavelets around f. If center=True, each wavelet is shifted to t=0 for simultaneous onset.

seidart.routines.sourcefunction.plotsource(t: ndarray, x: ndarray) Tuple[matplotlib.pyplot.Figure, ndarray]

Plots the source function and its power spectrum.

seidart.routines.sourcefunction.pointsource(modelclass, multimodal: bool = False, broadband: bool = False, fmin: float = None, fmax: float = None, center: bool = False, num_octaves: int = 2, source: str = 'ac', mt: ndarray = None, a_iso=1.0, b_dc=0.7) Tuple[ndarray, ndarray, ndarray, ndarray, ndarray]

Build and write point-source time series.

source can be:

“ac” - accelerated weight drop “dc” - double couple “tnt” - explosive “omni_ps” - omnidirectional p and s waves; 3 direction dc plus explosive source (for testing)

seidart.routines.sourcefunction.wavelet(timevec: ndarray, f: float, stype: str = 'gaus1', omni=False) ndarray

Generates a wavelet based on the specified type and parameters.

seidart.routines.sourcefunction.writesrc(fn: str, srcarray: ndarray) None

Writes a source array to a Fortran-formatted binary file.