IsolateOrders#

class ansys.sound.core.spectrogram_processing.IsolateOrders(signal=None, rpm_profile=None, orders=None, fft_size=1024, window_type='HANN', window_overlap=0.5, width_selection=10)#

Isolate the orders of a signal.

This class isolates the order of a signal that has an associated RPM profile.

Examples

Isolate orders 2 and 4 from a signal, and display the resulting signal.

>>> from ansys.sound.core.spectrogram_processing import IsolateOrders
>>> isolate_orders = IsolateOrders(signal=signal, rpm_profile=rpm_profile, orders=[2, 4])
>>> isolate_orders.process()
>>> isolated_orders_signal = isolate_orders.get_output()
>>> isolate_orders.plot()

See also

Isolate orders

Example demonstrating how to isolate orders.

Class instantiation takes the following parameters.

Parameters:
signalField, default: None

Input signal on which to isolate orders.

rpm_profileField, default: None

RPM signal associated with the input signal. It is assumed that the RPM signal’s unit is rpm. If this is not the case, inaccurate behavior might occur during the conversion from RPM to frequency.

orderslist[float], default: None

List of the order numbers to isolate. The list must contain at least one value.

fft_sizeint, default: 1024

Size of the FFT used to compute the STFT.

window_typestr, default: ‘HANN’

Window type used for the FFT computation. Options are 'TRIANGULAR', 'BLACKMAN', 'BLACKMANHARRIS', 'HAMMING', 'HANN', 'GAUSS', 'FLATTOP', and 'RECTANGULAR'.

window_overlapfloat, default: 0.5

Overlap value between two successive FFT computations. Values can range from 0 to 1. For example, 0 means no overlap, and 0.5 means 50% overlap.

width_selectionint, default: 10

Width in Hz of the area used to select each individual order. Note that its precision depends on the FFT size.

Methods

IsolateOrders.get_output()

Get the temporal signal of the isolated orders as a DPF field.

IsolateOrders.get_output_as_nparray()

Get the temporal signal of the isolated orders as a NumPy array.

IsolateOrders.plot()

Plot the signal after order isolation.

IsolateOrders.process()

Isolate the orders of the signal.

Attributes

IsolateOrders.fft_size

Number of FFT points.

IsolateOrders.orders

List of the order numbers to isolate.

IsolateOrders.rpm_profile

RPM profile.

IsolateOrders.signal

Input signal.

IsolateOrders.width_selection

Width in Hz of each individual order selection.

IsolateOrders.window_overlap

Window overlap in %.

IsolateOrders.window_type

Window type.