waveform_editor.waveform.Waveform¶
-
class waveform_editor.waveform.Waveform(*, waveform=
None, yaml_str='', line_number=0, is_repeated=False, name='waveform', dd_version=None)¶ Bases:
BaseWaveform-
__init__(*, waveform=
None, yaml_str='', line_number=0, is_repeated=False, name='waveform', dd_version=None)¶
Methods
__init__(*[, waveform, yaml_str, ...])Returns the length of the waveform.
get_derivative(time)Get the values of the derivatives at the provided time array.
get_metadata(dd_version)Parses the name of the waveform and returns the IDS metadata for this waveform.
get_value([time])Get the tendency values at the provided time array.
Converts the internal YAML waveform description to a string.
update_annotations([event])Merges the annotations of the individual tendencies into the annotations of this waveform.
- calc_length()¶
Returns the length of the waveform.
- get_derivative(time: ndarray) ndarray¶
Get the values of the derivatives at the provided time array.
- get_metadata(dd_version)¶
Parses the name of the waveform and returns the IDS metadata for this waveform. The name must be formatted as follows:
<IDS-Name>/<IDS-path>For example:
ec_launchers/beam(2)/phase/angle- Parameters:
- dd_version¶
Data dictionary version to create metadata for.
- Returns:
The metadata of the IDS node, or None if it could not find it.
-
get_value(time: ndarray | None =
None) tuple[numpy.ndarray, numpy.ndarray]¶ Get the tendency values at the provided time array. If no time array is provided, the individual tendencies are responsible for creating a time array, and these are appended.
- get_yaml_string()¶
Converts the internal YAML waveform description to a string.
- Returns:
The YAML waveform description as a string.
-
update_annotations(event=
None)¶ Merges the annotations of the individual tendencies into the annotations of this waveform.
-
__init__(*, waveform=