calc_transfer_function#

PySeismoSoil.helper_signal_processing.calc_transfer_function(input_signal: ndarray, output_signal: ndarray, *, amplitude_only: bool = True, smooth_signal: bool = False) ndarray[source]#

Calculate transfer function between the output and input time-domain signals. The two signals need to have the same time interval and same length.

Parameters:
  • input_signal (np.ndarray) – Input signal in the time domain. Needs to have two columns.

  • output_signal (np.ndarray) – Output signal in the time domain. Needs to have two columns.

  • amplitude_only (bool) – Whether to keep only the amplitude of the transfer function.

  • smooth_signal (bool) – Whether to smooth the amplitude spectrum. If smooth is True and amplitude_only is False, an error will be raised.

Returns:

trans_func_2col – The complex-valued or real-valued transfer function with two columns (frequency and ratio).

Return type:

np.ndarray

Raises:

ValueError – When the input or output signal contains invalid values