Mondaic
This API reference is not for the latest stable Salvus version.

salvus.project.tools.processing.block_processing.taper

Blockwise tapering.

Functions

taper()

def taper(
    data: numpy.ndarray,
    filter_params: salvus.project.tools.processing.block_processing.taper.TaperingFilterParams = TaperingFilterParams(
        max_percentage=0.05,
        window=scipy.signal.windows.windows.hann,
        side=both,
    ),
) -> numpy.ndarray:
    ...

Taper an array at one or both ends according to a set of parameters.

Operates blockwise on an entire array of receivers, and returns a new array which is tapered along the receivers’ time axis.

Parameters
  • data numpy.ndarray — The data to taper. Will be checked to ensure that it is of the correct shape (n_rec, n_cmp, n_samples).
  • filter_params salvus.project.tools.processing.block_processing.taper.TaperingFilterParams — The parameters controlling the tapering window.
Returns numpy.ndarray — The receiver data tapered along the time axis.

Classes

TaperingFilterParams

class TaperingFilterParams(builtins.object):
    def __init__(
        self,
        max_percentage: float = 0.05,
        window: Callable[
            [int], numpy.ndarray
        ] = scipy.signal.windows.windows.hann,
        side: str = "both",
    ) -> None:
        ...

Filter params for tapering.

Parameters
  • max_percentage float — The maximum percentage of the trace length over which to apply the taper. The window will ramp from its endpoint values to its midpoints value over this length. Note that this means that the filter sizes are may be double of what you may expect, as each individual side of 2-sided filter should cover the requested length.
  • window Callable[[int], numpy.ndarray] — The type of window used to perform the tapering.
  • side str — Apply the taper to the “left” side of the trace (smaller time values), the “right” side (larger time values), or “both”.