4.7.3. pde.trackers.intervals module¶
Module defining classes for time intervals for trackers
The provided interval classes are:
class representing equidistantly spaced time intervals |
|
class representing logarithmically spaced time intervals |
|
class representing time intervals spaced equidistantly in real time |
- class ConstantIntervals(dt: float = 1, t_start: float = None)[source]¶
Bases:
object
class representing equidistantly spaced time intervals
- Parameters
dt (float) – The duration between subsequent intervals. This is measured in simulation time units.
t_start (float, optional) – The time after which the tracker becomes active. If omitted, the tracker starts recording right away. This argument can be used for an initial equilibration period during which no data is recorded.
- IntervalType¶
alias of
ConstantIntervals
- class LogarithmicIntervals(dt_initial: float = 1, factor: float = 1, t_start: float = None)[source]¶
Bases:
ConstantIntervals
class representing logarithmically spaced time intervals
- Parameters
dt_initial (float) – The initial duration between subsequent intervals. This is measured in simulation time units.
factor (float) – The factor by which the time between intervals is increased every time. Values larger than one lead to time intervals that are increasingly further apart.
t_start (float, optional) – The time after which the tracker becomes active. If omitted, the tracker starts recording right away. This argument can be used for an initial equilibration period during which no data is recorded.
- class RealtimeIntervals(duration: Union[float, str], dt_initial: float = 0.01)[source]¶
Bases:
ConstantIntervals
class representing time intervals spaced equidistantly in real time
This spacing is only achieved approximately and depends on the initial value set by dt_initial and the actual variation in computation speed.
- Parameters
duration (float or str) – The duration (in realtime seconds) that the intervals should be spaced apart. The duration can also be given as a string, which is then parsed using the function
parse_duration()
.dt_initial (float) – The initial duration between subsequent intervals. This is measured in simulation time units.
- get_interval(interval: Union[ConstantIntervals, float, int, str]) ConstantIntervals [source]¶
create IntervalType from various data formats
If interval is of type
IntervalType
it is simply returned