Xtract#

class ansys.sound.core.xtract.Xtract(input_signal=None, parameters_denoiser=None, parameters_tonal=None, parameters_transient=None)#

Provides Xtract processing.

PyAnsys Sound performs Xtract processing in the same way as Ansys Sound Analysis and Specification (SAS). This operator chains a denoising step, followed by a tonal extraction step, and then a transient extraction step. It returns the individual signals processed at each step, as well as the remainder.

Class instantiation takes the following parameters.

Parameters:
input_signalFieldsContainer | Field, default: None

One or more signals to apply Xtract processing on as a DPF field or fields container.

parameters_denoiserXtractDenoiserParameters, default: None

Structure that contains the parameters of the denoising step:

  • Noise PSD (field) is the power spectral density (PSD) of the noise.

This structure is of the XtractDenoiserParameters type. For more information, see this class.

parameters_tonalXtractTonalParameters, default: None

Structure that contains the parameters of the tonal extraction step:

  • NFFT (int) is the number of points used for the FFT computation.

  • Regularity setting (float) in percent.

  • Maximum slope (float) in dB/Hz.

  • Minimum duration (float) in seconds.

  • Intertonal gap (float) in Hz.

  • Local emergence (float) in dB.

This structure is of the XtractTonalParameters type. For more information, see this class.

parameters_transientXtractTransientParameters, default: None

Structure that contains the parameters of the transient extraction step:

  • Lower threshold (float), which is between 0 and 100 percent.

  • Upper threshold (float), which is between 0 and 100 percent.

This structure is of the XtractTransientParameters type. For more information, see this class.

Methods

Xtract.convert_fields_container_to_np_array(fc)

Convert a DPF fields container to a NumPy array.

Xtract.get_output()

Get the output of the Xtract algorithm in a tuple as DPF fields containers or fields.

Xtract.get_output_as_nparray()

Get the output of the Xtract algorithm in a tuple as NumPy arrays.

Xtract.plot()

Plot the Xtract algorithm results.

Xtract.process()

Process the Xtract algorithm.

Attributes

Xtract.input_signal

Input signal.

Xtract.output_noise_signal

Noise signal.

Xtract.output_remainder_signal

Remainder signal.

Xtract.output_tonal_signal

Tonal signal.

Xtract.output_transient_signal

Transient signal.

Xtract.parameters_denoiser

Parameters of the denoiser step.

Xtract.parameters_tonal

Parameters of the tonal extraction step.

Xtract.parameters_transient

Parameters of the transient extraction step.