VelocityToStrainRateEdgeless

class of dascore.transform.strain
inherits from: PatchProcessor, DascoreBaseModel, pydantic.main.BaseModel
source

VelocityToStrainRateEdgeless(
    *args ,
    step_multiple: Any = 1,
)-> None

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.

Parameters

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

Examples

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)
Note

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 strain-rate note for more details on step_multiple and order effects.

Methods

Name Description
check Refuse a patch which does not carry what the operation needs.
get_metadata Return the metadata between samples, and the differencing plan.
kernel Return the difference of samples step_multiple apart, per gauge.
model_copy Copy the model, dropping cached values the update invalidates.
new Create new instance with some attributed updated.
velocity_to_strain_rate_edgeless Estimate strain-rate using central differences.
reconcile Return metadata or a patch holding the final data; default as is.
run Run the operation: check, get_metadata, kernel, reconcile, record.