Source code for gmprocess.waveform_processing.taper
"""Module for tapering functions."""fromgmprocess.waveform_processing.processing_stepimportprocessing_step
[docs]@processing_stepdeftaper(st,type="hann",width=0.05,side="both",config=None):"""Taper streams. Args: st (StationStream): Stream of data. type (str): Taper type. width (float): Taper width as percentage of trace length. side (str): Valid options: "both", "left", "right". config (dict): Configuration dictionary (or None). See get_config(). Returns: StationStream: Stream with the taper applied. """ifnotst.passed:returnstfortrinst:iftr.passed:tr.taper(max_percentage=width,type=type,side=side)returnst