CADETProcess.dynamicEvents.TimeLine#
- class CADETProcess.dynamicEvents.TimeLine[source]#
Class representing a timeline of time-varying data.
The timeline is made up of Sections, which are continuous time intervals. Each Section represents a piecewise polynomial function that defines the variation of a given parameter over time.
- Attributes:
sections
List[Section]list: Sections of the TimeLine.
Methods
add_section
(section)Add a Section to the timeline.
coefficients
(time)Return coefficient of polynomial at given time.
from_constant
(start, end, value)Create a timeline with a constant value for a given time range.
from_profile
(time, profile[, s])Create a timeline from a profile.
integral
([start, end])Calculate integral of sections in interval [start, end].
plot
(ax[, use_minutes])Plot the state of the timeline over time.
section_index
(time)Return the index of the section that contains the specified time.
Updates the piecewise polynomial representation of the timeline.
value
(time)np.array: Value of parameter at given time