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
- response
numpy.ndarray
Data samples of the accelerometer signal [m/s**2].
- source
numpy.ndarray
Data samples of the tilt signal [rad].
- dt
float
Sampling interval [s].
- fmin
float
, optional Minimum frequency for band-limited correction [Hz]. Only applicable in
'coh'
and'freq'
methods.- fmax
float
, optional Maximum frequency for band-limited correction [Hz]. Only applicable in
'coh'
and'freq'
methods.- parallel
bool
, optional, Default=True Flag to indicate if tilt and acceleration axes are parallel (
True
) or antiparallel (False
).- threshold
float
, optional, Default=0.5 Correction is applied only where
abs(coherence) >= threshold
. Only applicable in'coh'
method.- smooth
float
, 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.- g
float
, optional, Default=9.81 Gravitational acceleration [m/s**2].
- method
str
, 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
andresponse
(the same zero-padding has to be applied). If set toNone
, it is computed fromresponse
andsource
usingtwistpy.tilt.correction.transfer_function
.
- response
- Returns
- signal_out
numpy.ndarray
Data samples of corrected accelerometer signal [m/s**2].
- signal_out