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:
- psd
Field
, 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_value
float
, 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_weighting
str
, 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.
- psd
Methods
OctaveLevelsFromPSD.convert_fields_container_to_np_array
(fc)Convert a DPF fields container to a NumPy array.
Return the band levels in dB as a numpy array.
Return the center frequencies in Hz of the band levels as a numpy array.
Return the band levels in dB.
Return the band levels in dB and center frequencies in Hz as a tuple of numpy arrays.
Plot the octave-band levels.
Compute the band levels.
Attributes
Frequency weighting of the computed levels.
Input power spectral density (PSD).
Reference value for the levels' computation.
Whether to simulate the 1/3-octave band filterbank (ANSI S1.11-1986/IEC 61260).