delta_patch

function of dascore.examples source

delta_patch(
    dim = time,
    shape = (10, 200),
    time_min = 2020-01-01,
    time_step = 0.004,
    distance_min = 0,
    distance_step = 1,
    patch = None,
)

Create a delta function patch (zeros everywhere except for a unit value at the center) along the specified dimension. The returned delta patch has single coordinate(s) along the other dimensions.

Parameters

Parameter Description
dim : str The dimension at the center of which to place the unit value.
Typically "time" or "distance".
shape : tuple of int The shape of the data as (distance, time). Defaults to (10, 200).
This is used only if no existing patch is provided.
time_min : str or datetime64 The start time of the patch.
time_step : float The time step in seconds between samples.
distance_min : float The minimum distance coordinate.
distance_step : float The distance step in meters between samples.
patch : dascore.Patch If provided, creates the delta patch based on this existing patch.
Default is None.