Time Series
Description
This class is the parent class for Sequence, and all of the classes
derived from AudioDerivative: Audio, Envelope,
Pitch, Intensity, and Formant.
Methods
These methods will be developed in future versions of the toolbox to avoid repetitions in the children classes.
- class krajjat.classes.time_series.TimeSeries.__init__(self, kind=None, path=None, name=None, condition=None, verbosity=1)
- class krajjat.classes.time_series.TimeSeries._define_name_init(self, verbosity=1)
Sets the name attribute for an instance of the class, using the name provided during the initialization, or the path. If no
nameis provided, the function will create the name based on thepathprovided, by defining the name as the last element of the path hierarchy (last subfolder, or file name). For example, ifpathis"C:/Users/Darlene/Documents/Recording001/", the function will define the name on"Recording001". If bothnameandpathare set onNone, the object name will be defined as"Unnamed x", with x being the class name (audio,sequence, or one of the audio derivatives).New in version 2.0.
- Parameters:
verbosity (int, optional) –
Sets how much feedback the code will provide in the console output:
0: Silent mode. The code won’t provide any feedback, apart from error messages.
1: Normal mode (default). The code will provide essential feedback such as progression markers and current steps.
2: Chatty mode. The code will provide all possible information on the events happening. Note that this may clutter the output and slow down the execution.
- class krajjat.classes.time_series.TimeSeries._load_from_path(self, verbosity=1)
Loads the data from the
pathprovided during the initialization.New in version 2.0.
- Parameters:
verbosity (int, optional) –
Sets how much feedback the code will provide in the console output:
0: Silent mode. The code won’t provide any feedback, apart from error messages.
1: Normal mode (default). The code will provide essential feedback such as progression markers and current steps.
2: Chatty mode. The code will provide all possible information on the events happening. Note that this may clutter the output and slow down the execution.
- class krajjat.classes.time_series.TimeSeries._set_attributes_from_other_object(self, other)
Sets the attributes condition, path and metadata of the object from another instance.
New in version 2.0.
- Parameters:
other (TimeSeries) – Another TimeSeries instance, from which to copy some of the parameters.
- class krajjat.classes.time_series.TimeSeries.set_name(self, name)
Sets the
nameattribute of the instance. This name can be used as display functions or as a means to identify the object.New in version 2.0.
- Parameters:
name (str) – A name to describe the instance.
- class krajjat.classes.time_series.TimeSeries.set_condition(self, condition)
Sets the
conditionattribute of the instance. This attribute can be used to save the experimental condition in which the instance was recorded.New in version 2.0.
- Parameters:
condition (str) – The experimental condition in which the instance was recorded.