rsqsim_api.fault.splines
Spline utilities for constructing idealised slip distributions on fault patches.
Provides functions that build scipy.interpolate.UnivariateSpline
objects encoding along-fault and depth-dependent slip profiles, suitable
for imposing prescribed slip distributions in RSQSim or other fault models.
Functions
|
Build a univariate spline encoding slip as a function of along-fault distance. |
|
Build a univariate spline encoding normalised slip as a function of normalised depth. |
Module Contents
- rsqsim_api.fault.splines.fault_edge_spline(max_slip, distance_width, total_width, min_slip_fraction=0.0, line_stop_fraction=0.5, gradient_change=1.2, spline_k=3, spline_s=0.0, resolution=10.0)[source]
Build a univariate spline encoding slip as a function of along-fault distance.
Constructs an interpolated spline that ramps from a minimum slip fraction at the fault edge up to the maximum slip, with a piecewise-linear interpolant shaped by the supplied parameters.
- Parameters:
max_slip (float) – Maximum slip value (m or m/yr) at the centre of the fault.
distance_width (float) – Along-fault distance (m) at which
max_slipis reached.total_width (float) – Total along-fault width (m) of the spline domain.
min_slip_fraction (float, optional) – Fraction of
max_slipat the fault edge (distance = 0). Defaults to 0.line_stop_fraction (float, optional) – Fraction of
distance_widthat which the initial ramp levels off before the gradient change. Defaults to 0.5.gradient_change (float, optional) – Multiplicative factor applied to the intermediate y value to create a smooth overshoot before the final ramp. Defaults to 1.2.
spline_k (int, optional) – Degree of the smoothing spline. Defaults to 3 (cubic).
spline_s (float, optional) – Smoothing factor passed to
UnivariateSpline. Defaults to 0.0 (interpolating spline).resolution (float, optional) – Sample spacing (m) used when building the x-axis for interpolation. Defaults to 10.
- Returns:
Spline object; call with an x array (metres from edge) to evaluate the slip profile.
- Return type:
scipy.interpolate.UnivariateSpline
- rsqsim_api.fault.splines.fault_depth_spline(gradient_change_x, after_change_fract, resolution=0.01, after_change_gradient=1.2, spline_k=3, spline_s=0.0)[source]
Build a univariate spline encoding normalised slip as a function of normalised depth.
Produces a spline on [0, 1] (normalised depth fraction) that is approximately flat at 1 down to
gradient_change_x, then ramps linearly to 0 at the base of the fault, with an optional gradient overshoot controlled byafter_change_gradient.- Parameters:
gradient_change_x (float) – Normalised depth (0–1) at which the gradient begins to change.
after_change_fract (float) – Fraction of the remaining depth below
gradient_change_xover which the gradient change is applied.resolution (float, optional) – Sample spacing in normalised depth used when building the spline. Defaults to 0.01.
after_change_gradient (float, optional) – Multiplicative factor that controls the magnitude of the gradient overshoot. Defaults to 1.2.
spline_k (int, optional) – Degree of the smoothing spline. Defaults to 3 (cubic).
spline_s (float, optional) – Smoothing factor passed to
UnivariateSpline. Defaults to 0.0 (interpolating spline).
- Returns:
Spline object; call with a normalised-depth array to evaluate the depth-dependent slip multiplier.
- Return type:
scipy.interpolate.UnivariateSpline