OneThirdOctaveLevelsFromSignal#

class ansys.sound.core.standard_levels.OneThirdOctaveLevelsFromSignal(signal=None, reference_value=1.0, frequency_weighting='')#

Compute 1/3-octave levels from a time-domain signal input.

This class computes 1/3-octave levels from a time-domain signal.

Added in DPF server version 11.0.

Class instantiation takes the following parameters.

Parameters:
signalField, default: None

The time-domain signal from which the levels are computed.

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

OneThirdOctaveLevelsFromSignal.convert_fields_container_to_np_array(fc)

Convert a DPF fields container to a NumPy array.

OneThirdOctaveLevelsFromSignal.get_band_levels()

Return the band levels in dB as a numpy array.

OneThirdOctaveLevelsFromSignal.get_center_frequencies()

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

OneThirdOctaveLevelsFromSignal.get_output()

Return the band levels in dB.

OneThirdOctaveLevelsFromSignal.get_output_as_nparray()

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

OneThirdOctaveLevelsFromSignal.plot()

Plot the 1/3-octave-band levels.

OneThirdOctaveLevelsFromSignal.process()

Compute the one-third-octave-band levels.

Attributes

OneThirdOctaveLevelsFromSignal.frequency_weighting

Frequency weighting of the computed levels.

OneThirdOctaveLevelsFromSignal.reference_value

Reference value for the levels' computation.

OneThirdOctaveLevelsFromSignal.signal

Input time-domain signal.