5.2.14.1.2. eqcorrscan.utils.synth_seis.seis_sim

eqcorrscan.utils.synth_seis.seis_sim(sp, amp_ratio=1.5, flength=False, phaseout='all')[source]

Generate a simulated seismogram from a given S-P time.

Will generate spikes separated by a given S-P time, which are then convolved with a decaying sine function. The P-phase is simulated by a positive spike of value 1, the S-arrival is simulated by a decaying boxcar of maximum amplitude 1.5. These amplitude ratios can be altered by changing the amp_ratio, which is the ratio S amplitude:P amplitude.

Note

In testing this can achieve 0.3 or greater cross-correlations with data.

Parameters
  • sp (int) – S-P time in samples

  • amp_ratio (float) – S:P amplitude ratio

  • flength (int) – Fixed length in samples, defaults to False

  • phaseout (str) – Either ‘P’, ‘S’ or ‘all’, controls which phases to cut around, defaults to ‘all’. Can only be used with ‘P’ or ‘S’ options if flength is set.

Returns

Simulated data.

Return type

numpy.ndarray