Version:

salvus.project.tools.processing.block_processing.convolve

salvus.project.tools.processing.block_processing.convolve salvus project tools processing block_processing convolve
Convolution-related operations.

Functions

unify_gridding()

Compatibilize sampling axes for further processing.
Ensures that all grids have sampling locations, that if extended to overlap, match exactly. Grids are guaranteed to extend beyond the original limits, and sample at least as dense as the original. All returned grids have the same sampling rates.
SIGNATURE
def unify_gridding(
    sample_grids: npt.NDArray, equalize_grid_length: bool = True
) -> list[npt.NDArray]: ...
ARGUMENTS
Required
sample_grids
Type:npt.NDArray
Description:
An arbitrary number of 1D numpy arrays passed as positional arguments containing different sample grids.
Optional
equalize_grid_length
Type:bool
Default value:True
Description:
Option to make the sample grids the same number of sample points. Defaults to True.
RETURNS
Return type: list[npt.NDArray]
A variable length list containing all new sampling axes.

unify_signals()

Interpolate signals to compatible sampling grids, by default to equal length.
SIGNATURE
def unify_signals(
    sampling_and_signal: tuple[npt.NDArray, npt.NDArray],
    equalize_signal_length: bool = True,
) -> list[tuple[npt.NDArray, npt.NDArray]]: ...
ARGUMENTS
Required
sampling_and_signal
Type:tuple[npt.NDArray, npt.NDArray]
Description:
The sampling axes and signals to interpolate to the same sampling axes, passed as positional arguments.
Optional
equalize_signal_length
Type:bool
Default value:True
Description:
Optional flag to make the signals equal length by padding with the final value of the shorter signals. Defaults to True.
RETURNS
Return type: list[tuple[npt.NDArray, npt.NDArray]]
List of tuples of ndarrays containing the sampling axes and associated compatibilized signals.
PAGE CONTENTS