CropSignal#
- class ansys.sound.core.signal_utilities.CropSignal(signal=None, start_time=0.0, end_time=0.0)#
Crop a signal.
This class allows cropping a signal, that is, extracting a segment of it.
Examples
Crop a signal between 1.0 s and 3.0 s.
>>> from ansys.sound.core.signal_utilities import CropSignal >>> crop_signal = CropSignal(signal=my_signal, start_time=1.0, end_time=3.0) >>> crop_signal.process() >>> signal_segment = crop_signal.get_output()
Class instantiation takes the following parameters.
- Parameters:
Methods
Get the cropped signal as a DPF fields container.
Get the cropped signal as a NumPy array.
Plot the resulting signals in a single figure.
Crop the signal.
Attributes
End time of the part to crop in s.
Input signal as a DPF field or fields container.
Start time of the part to crop in s.