ToneToNoiseRatio#

class ansys.sound.core.psychoacoustics.ToneToNoiseRatio(psd=None, frequency_list=None)#

Computes the ECMA 418-1/ISO 7779 tone-to-noise ratio (TNR).

This class computes the TNR on a power spectral density (PSD) following the ECMA 418-1 and ISO 7779 standards.

Methods

ToneToNoiseRatio.convert_fields_container_to_np_array(fc)

Convert a DPF fields container to a NumPy array.

ToneToNoiseRatio.get_TNR_values()

Get the vector of the peaks' TNR values in dB.

ToneToNoiseRatio.get_max_TNR_value()

Get the maximum TNR value in dB.

ToneToNoiseRatio.get_nb_tones()

Get the number of tones.

ToneToNoiseRatio.get_output()

Get TNR data as a generic data container.

ToneToNoiseRatio.get_output_as_nparray()

Get TNR data in a tuple as a NumPy array.

ToneToNoiseRatio.get_peaks_frequencies()

Get the vector of the peaks' frequencies in Hz.

ToneToNoiseRatio.get_peaks_high_frequencies()

Get the vector of the peaks' higher-frequency limits in Hz.

ToneToNoiseRatio.get_peaks_levels()

Get the vector of the peaks' level values in dB SPL.

ToneToNoiseRatio.get_peaks_low_frequencies()

Get the vector of the peaks' lower-frequency limits in Hz.

ToneToNoiseRatio.get_reference_curve()

Get a reference curve to compare the TNR with.

ToneToNoiseRatio.get_single_tone_info(tone_index)

Get the TNR information for a tone.

ToneToNoiseRatio.plot()

Plot the TNR for all identified peaks, along with the reference curve.

ToneToNoiseRatio.process()

Compute the TNR.

Attributes

ToneToNoiseRatio.frequency_list

Get a list of the frequencies in Hz of the tones to calculate TNR for.

ToneToNoiseRatio.psd

Power spectral density.