OctaveLevelsFromPSD#

class ansys.sound.core.standard_levels.OctaveLevelsFromPSD(psd=None, use_ansi_s1_11_1986=False, reference_value=1.0, frequency_weighting='')#

Compute octave levels from a power spectral density (PSD) input.

This class computes octave levels from a PSD.

Added in DPF server version 11.0.

Class instantiation takes the following parameters.

Parameters:
psdField, default: None

The power spectral density (PSD) from which the levels are computed.

use_ansi_s1_11_1986bool, default: False

Whether to simulate the 1/3-octave filterbank as defined in ANSI S1.11-1986 and IEC 61260 standards.

reference_valuefloat, default: 1.0

The reference value for the levels’ computation. If the levels are computed with a PSD in Pa^2/Hz, the reference value should be 2e-5 (Pa).

frequency_weightingstr, default: “”

The frequency weighting to apply to the signal before computing the levels. Available options are “”, “A”, “B”, and “C”, to get levels in dB (or dBSPL), dBA, dBB, and dBC, respectively.

Methods

OctaveLevelsFromPSD.convert_fields_container_to_np_array(fc)

Convert a DPF fields container to a NumPy array.

OctaveLevelsFromPSD.get_band_levels()

Return the band levels in dB as a numpy array.

OctaveLevelsFromPSD.get_center_frequencies()

Return the center frequencies in Hz of the band levels as a numpy array.

OctaveLevelsFromPSD.get_output()

Return the band levels in dB.

OctaveLevelsFromPSD.get_output_as_nparray()

Return the band levels in dB and center frequencies in Hz as a tuple of numpy arrays.

OctaveLevelsFromPSD.plot()

Plot the octave-band levels.

OctaveLevelsFromPSD.process()

Compute the band levels.

Attributes

OctaveLevelsFromPSD.frequency_weighting

Frequency weighting of the computed levels.

OctaveLevelsFromPSD.psd

Input power spectral density (PSD).

OctaveLevelsFromPSD.reference_value

Reference value for the levels' computation.

OctaveLevelsFromPSD.use_ansi_s1_11_1986

Whether to simulate the 1/3-octave band filterbank (ANSI S1.11-1986/IEC 61260).