twistpy.tilt.correction.transfer_function#
- transfer_function(response: ndarray, source: ndarray, dt: float, smooth: float) tuple[source]#
Calculate transfer function and complex coherence between two signals. The transfer function is calculated from smoothed cross- and non-smoothed autospectral densities of source and response signal. Smoothing is done by convolution with a Blackman window. The complex transfer function, the autospectral densities, and a corresponding frequency vector are returned.
- Parameters
- response
numpy.ndarray Sample data of the response signal.
- source
numpy.ndarray Sample data of the source signal.
- dt
float Sampling interval [s].
- smooth
float Size of the Blackman window used for smoothing [Hz].
- response
- Returns
- output5-
tupleofnumpy.ndarray (
freq,XX,YY,Ars,coh)freq: array of frequenciesGrr: autospectral density of response signal,Gss: autospectral density of source signal,Ars: source to response transfer function,coh: smoothed complex coherence between source and response signal
- output5-