FraCSPy API#

The Application Programming Interface (API) of FraCSPy mirrors the usual microseismic workflow from pre-processing to source mechanism inversion. It is composed of the following modules:

  • Detection

  • Localisation

  • Moment Tensor Inversion

Detection#

maxdiffstack(data, x, y, z, tt, dt[, ...])

Maximum diffraction stack function for microseismic event detection.

stalta(tdf, dt, stw, ltw[, gtw])

STA/LTA computation.

detect_peaks(msf, slf, slt)

Detect peaks in the maximum stack function based on STA/LTA function.

estimate_origin_times(idp, ds_full, tt, dt, ...)

Estimate origin times of the events detected with diffraction stacking.

diffstack_detect(data, x, y, z, tt, dt, stw, ltw)

Microseismic event detection based on diffraction stacking.

Localisation#

Modelling#

Kirchhoff(z, x, t, recs, vel, wav, wavcenter)

Kirchhoff single-sided, demigration operator.

TAKirchhoff(z, x, t, recs, wav, wavcenter[, ...])

True-amplitude Kirchhoff single-sided, demigration operator.

MTSKirchhoff(x, y, z, recs, t, wav, wavc, ...)

Moment Tensor Single Component Kirchhoff operator.

MTMKirchhoff(x, y, z, recs, t, wav, wavc, ...)

Moment Tensor Multi Component Kirchhoff operator.

Imaging/Inversion#

kmigration(data, n_xyz, Op[, nforhc])

Kirchhoff migration for microseismic source location.

diffstack(data, n_xyz, x, y, z, tt, dt[, ...])

Diffraction stacking for microseismic source location.

lsi(data, n_xyz, Op[, niter, nforhc, verbose])

Least-squares imaging for microseismic source location

sparselsi(data, n_xyz, Op[, niter, l1eps, ...])

Sparsity-promoting imaging for microseismic source location

xcorri(data, n_xyz, Op[, niter, l1eps, lr, ...])

Cross-correlation-based imaging for microseismic source location

Location(x, y, z)

Event location

Utilities#

add_noise(data[, noise_type, snr, trind, seed])

Contaminate seismic data with noise of different type.

get_max_locs(ssimage[, n_max, rem_edge, ...])

Source location from image

dist2rec(recs, gx, gy, gz)

Compute distances from a 3D grid of points to array of receivers.

moveout_correction(data, itshifts)

Moveout correction for microseismic data.

polarity_correction(data[, polcor_type, g, ...])

Polarity correction for microseismic data with corrected event moveout.

semblance_stack(data[, swsize])

Computes the semblance stack for a given input array.

Moment Tensor Inversion#

Inverse engines#

MTA(x, y, z, recs, vel, src_idx, cmp_idx, ...)

Moment-Tensor Amplitude modelling and inversion

MTW(x, y, z, recs, vel, src_idx, comp_idx, ...)

Moment-Tensor Waveform modelling and inversion

MTInversion(x, y, z, recs, vel)

Moment-Tensor inversion

Utilities#

collect_source_angles(x, y, z, recs)

Angles between sources and receivers

pwave_greens_comp(cosine_sourceangles, ...)

Particle velocity component of the P-wave Green's function

mt_pwave_greens_comp(n_xyz, ...)

Particle velocity component of the P-wave Green's functions within a volumetric source grid for all moment tensor components

mt_pwave_greens_multicomp(n_xyz, ...)

Particle velocity components of the P-wave Green's functions within a volumetric source grid for all moment tensor components

get_mt_at_loc(mt_image_set, location_indices)

Moment tensor at specific location

get_mt_max_locs(mt_image_set[, n_max, ...])

Source location from moment tensor component images

get_magnitude(mt)

Seismic moment and local magnitude