twistpy.tilt.correction.remove_tilt#

remove_tilt(response: ndarray, source: ndarray, dt: float, fmin: Optional[float] = None, fmax: Optional[float] = None, parallel: bool = True, threshold: float = 0.5, smooth: float = 1.0, g: float = 9.81, method: str = 'coh', trans_coh: Optional[Tuple[ndarray, ndarray]] = None) ndarray[source]#

Remove tilt noise from translational accelerometer recordings. See the method argument for different correction options. The correction can optionally be applied only in a selected frequency band. The method is described in Bernauer et al. (2022) and is based on the work of Crawford and Webb (2000).

Parameters
responsenumpy.ndarray

Data samples of the accelerometer signal [m/s**2].

sourcenumpy.ndarray

Data samples of the tilt signal [rad].

dtfloat

Sampling interval [s].

fminfloat, optional

Minimum frequency for band-limited correction [Hz]. Only applicable in 'coh' and 'freq' methods.

fmaxfloat, optional

Maximum frequency for band-limited correction [Hz]. Only applicable in 'coh' and 'freq' methods.

parallelbool, optional, Default=True

Flag to indicate if tilt and acceleration axes are parallel (True) or antiparallel (False).

thresholdfloat, optional, Default=0.5

Correction is applied only where abs(coherence) >= threshold. Only applicable in 'coh' method.

smoothfloat, optional, Defaault=1.0

Size of the Blackman window [Hz] used for smoothing when calculating the coherence with tilt_utils.transfer_function. Only applicable in 'coh' and 'freq' methods.

gfloat, optional, Default=9.81

Gravitational acceleration [m/s**2].

methodstr, optional, Default=’coh’

Correction method to use.

..hint:: ‘coh’: apply theoretical transfer

function where coherence is significant (via frequency domain),

‘freq’: Use empirical transfer function estimate (via frequency domain)

‘direct’: Apply theoretical transfer function directly (in time domain).

trans_coh(numpy.ndarray, numpy.ndaarray), optional

If given, previously calculated transfer function and complex coherence between the tilt and accelerometer signals, used to decide where to apply the correction. The size of the given arrays must match the size of the spectra of source and response (the same zero-padding has to be applied). If set to None, it is computed from response and source using twistpy.tilt.correction.transfer_function.

Returns
signal_outnumpy.ndarray

Data samples of corrected accelerometer signal [m/s**2].

Examples using twistpy.tilt.correction.remove_tilt#

Tilt correction

Tilt correction