taper_Tukey#
- PySeismoSoil.helper_signal_processing.taper_Tukey(input_signal: ndarray, width: float = 0.05) ndarray[source]#
Taper a time-domain signal on both ends with a Tukey window.
- Parameters:
input_signal (np.ndarray) – Signal to be tapered. Can be 1D numpy array or 2D array with 2 columns.
width (float, default=0.05) – The width of the Tukey window. The two tapered (cosine-shaped) ends together span
width / 2of the signal length (width / 4at each end), i.e.,width / 2is thealphaparameter ofscipy.signal.windows.tukey().
- Returns:
output – The tapered signal. If
input_signalhas 2 columns, the 0th column (time) is unchanged.- Return type:
np.ndarray
- Raises:
TypeError – When the input signal is not a numpy array