OverallLevelFromPSD#
- class ansys.sound.core.standard_levels.OverallLevelFromPSD(psd=None, scale='dB', reference_value=1.0, frequency_weighting='')#
Compute the overall level from a power spectral density (PSD) input.
This class computes the overall level from a PSD, on a decibel scale or a linear, root-mean-square (RMS) scale.
See also
OverallLevel,OneThirdOctaveLevelsFromPSD,OctaveLevelsFromPSD,PowerSpectralDensityExamples
Compute the overall level from a PSD.
>>> from ansys.sound.core.standard_levels import OverallLevelFromPSD >>> level = OverallLevelFromPSD(psd=my_psd, reference_value=2e-5) >>> level.process() >>> level_dB = level.get_level()
Added in DPF Sound plugin version 2027.1.0.
Class instantiation takes the following parameters.
- Parameters:
- psd
Field, default:None The input power spectral density (PSD), in unit^2/Hz.
- scale
str, default: “dB” The scale type of the output level. Available options are “dB” and “RMS”.
- reference_value
float, default: 1.0 The reference value for the level computation. If the PSD is computed from a signal in Pa, the reference value should be 2e-5 (Pa).
- frequency_weighting
str, default: “” The frequency weighting to apply before computing the level. Available options are “”, “A”, “B”, and “C”, respectively to get level in dB (or dBSPL), dBA, dBB, and dBC. Note that the frequency weighting is only applied if the attribute
scaleis set to “dB”.
- psd
Methods
Return the overall level.
Return the overall level.
Return the overall level as a numpy array.
Plot the output.
Compute the overall level from the PSD.
Attributes
Frequency weighting of the computed level.
Input power spectral density (PSD).
Reference value for the level computation.
Scale type of the output level.