pystrata.variation.SoilTypeVariation¶
- class pystrata.variation.SoilTypeVariation(correlation, limits_mod_reduc=[0.05, 1], limits_damping=[0, 0.15], vary_bedrock=False, sample_mode='random', percentiles=None)[source]¶
Base class for soil-type (modulus-reduction and damping) variation.
- Parameters:
correlation (float) – Correlation coefficient between the modulus-reduction and damping random variables.
limits_mod_reduc (list[float], optional) –
[min, max]clipping bounds for modulus reduction.limits_damping (list[float], optional) –
[min, max]clipping bounds for damping.vary_bedrock (bool, optional) – Whether to include the half-space in the variation.
sample_mode ({'random', 'fixed_percentiles'}, optional) –
How samples are drawn when
iter_varied_profiles()iterates:'random'(default) — each call draws an independent random realisation from the truncated-normal distribution.'fixed_percentiles'— each call uses a pre-specified percentile supplied viasample_indexso that the same index always produces an identical realisation. The percentile is selected aspercentiles[sample_index % len(percentiles)], so the list cycles when count is a multiple of its length. The caller must pass thesample_indexkeyword argument to__call__(), anditer_varied_profiles()does this automatically.
percentiles (list[float] | None, optional) – Ordered sequence of quantiles in
(0, 1)used in'fixed_percentiles'mode. The sequence cycles: iteration i drawspercentiles[i % len(percentiles)]. Required (and only used) when sample_mode is'fixed_percentiles'.
- __init__(correlation, limits_mod_reduc=[0.05, 1], limits_damping=[0, 0.15], vary_bedrock=False, sample_mode='random', percentiles=None)[source]¶
Methods
__init__(correlation[, limits_mod_reduc, ...])vary_profile(profile[, sample_index])Return a profile with varied soil types.
Attributes
correlationlimits_dampinglimits_mod_reducPercentile list used in
'fixed_percentiles'mode, or None.'random'or'fixed_percentiles'.vary_bedrock