function of dascore.transform.strain source

    patch: Patch ,
    step_multiple: int = 1,
)-> ‘PatchType’

Estimate strain-rate using central differences.

For odd step_multiple values this function estimates strain by taking a staggered central difference according to:

\[ \hat{f} = \frac{f(x + n * dx/2) - f(x - n * dx/2)}{dx} \]

Where \(dx\) is the spatial sampling and \(n\) is the step_multiple. As a result the strain-rate between existing samples is estimated when \(n\) is odd. Edges (points where full central differences are not possible) are discarded in the output.


Parameter Description
patch A patch object containing DAS data. Note: attrs[‘data_type’] should be
step_multiple The number of spatial sampling steps to use in the central averaging.


import dascore as dc
patch = dc.get_example_patch("deformation_rate_event_1")

# Example 1
# Estimate strain rate with a gauge length equal to distance step.
patch_strain = patch.velocity_to_strain_rate_edgeless(step_multiple=1)

# Example 2
# Estimate strain rate with a gauge length 5 times the distance step.
patch_strain = patch.velocity_to_strain_rate_edgeless(step_multiple=5)

See velocity_to_strain_rate for a similar function which does not change the shape of the patch.

The resulting gauge length is equal to the step_multiple multiplied by the sampling along the distance dimension.

See the velocity_to_strain_rate note for more details on step_multiple and order effects.