2.3.8. sdepy.true_source¶
-
class
sdepy.true_source(*, paths=1, vshape=(), dtype=None, rtol='max', t0=0.0, z0=0.0)[source]¶ Base class for stochasticity sources with memory.
Parameters: - paths, vshape, dtype
See
sourceclass documentation.- rtol : float, or ‘max’
relative tolerance used in assessing the coincidence of
twith the time of a previously stored realization of the source. If set tomax, the resolution of thefloattype is used.- t0, z0 : array-like
z0 is the initial value of the source at time t0.
Returns: - array
Once instantiated as
dz,dz(t)returns the realized value at timetof the source process, such thatdz(t0) = z0, with shape(t + dt).shape + vshape + (paths,), as specified by subclasses.dz(t, dt)returnsdz(t + dt) - dz(t). New values ofdz(t)should follow a probability distribution conditional on values realized in previous calls. Defaults to an array ofnumpy.nan.
See also
Attributes: Methods
__getitem__(index)Reference to a sub-array or element of the source values sharing the same memory of past realizations. new_inside(z1, z2, t1, t2, s)Generate a new process increment, at a time s between those of formerly realized values. new_outside(z, t, s)Generate a new process increment, at a time s above or below those of formerly realized values.