LASP 1.0
Library for Acoustic Signal Processing
|
Multi-channel Sound Level Meter. More...
Public Member Functions | |
__init__ (self, fs, fbdesigner=None, TimeWeighting tw=TimeWeighting.fast, FreqWeighting fw=FreqWeighting.A, xmin=None, xmax=None, include_overall=True, level_ref_value=P_REF, offset_t=0) | |
Initialize a sound level meter object. | |
run (self, data) | |
Add new fresh timedata to the Sound Level Meter. | |
return_as_dict (self, dat) | |
Helper function used to return resulting data in a proper way. | |
Leq (self) | |
Returns the computed equivalent levels for each filter channel. | |
Lmax (self) | |
Returns the computed max levels for each filter channel. | |
Lpeak (self) | |
Returns the computed peak levels for each filter channel. | |
Leq_array (self) | |
Lmax_array (self) | |
Lpeak_array (self) | |
Public Attributes | |
fbdesigner | |
xs | |
include_overall | |
offset_t | |
nom_txt | |
slm | |
fs_slm | |
N | |
Multi-channel Sound Level Meter.
Input data: time data with a certain sampling frequency. Output: time-weighted (fast/slow) sound pressure levels in dB(A/C/Z). Possibly in octave bands.
Definition at line 25 of file lasp_slm.py.
lasp.lasp_slm.SLM.__init__ | ( | self, | |
fs, | |||
fbdesigner = None , |
|||
TimeWeighting | tw = TimeWeighting.fast , |
||
FreqWeighting | fw = FreqWeighting.A , |
||
xmin = None , |
|||
xmax = None , |
|||
include_overall = True , |
|||
level_ref_value = P_REF , |
|||
offset_t = 0 |
|||
) |
Initialize a sound level meter object.
Args: fs: Sampling frequency of input data [Hz] fbdesigner: FilterBankDesigner to use for creating the (fractional) octave bank filters. Set this one to None to only do overalls fs: Sampling frequency [Hz] tw: Time Weighting to apply fw: Frequency weighting to apply xmin: Filter designator of lowest band. xmax: Filter designator of highest band include_overall: If true, a non-functioning filter is added which is used to compute the overall level. level_ref_value: Reference value for computing the levels in dB offset_t: Offset to be added to output time data [s]
Definition at line 32 of file lasp_slm.py.
lasp.lasp_slm.SLM.Leq | ( | self | ) |
Returns the computed equivalent levels for each filter channel.
Definition at line 202 of file lasp_slm.py.
lasp.lasp_slm.SLM.Leq_array | ( | self | ) |
Definition at line 220 of file lasp_slm.py.
lasp.lasp_slm.SLM.Lmax | ( | self | ) |
Returns the computed max levels for each filter channel.
Definition at line 208 of file lasp_slm.py.
lasp.lasp_slm.SLM.Lmax_array | ( | self | ) |
Definition at line 223 of file lasp_slm.py.
lasp.lasp_slm.SLM.Lpeak | ( | self | ) |
Returns the computed peak levels for each filter channel.
Definition at line 214 of file lasp_slm.py.
lasp.lasp_slm.SLM.Lpeak_array | ( | self | ) |
Definition at line 226 of file lasp_slm.py.
lasp.lasp_slm.SLM.return_as_dict | ( | self, | |
dat | |||
) |
Helper function used to return resulting data in a proper way.
Returns a dictionary with the following keys: 'data': The y-values of Lmax, Lpeak, etc 'overall': The overall value, in [dB] COULD BE NOT PART OF OUTPUT 'x': The exponents of the octave, such that the midband frequency corresponds to 1000*G**(x/b), where b is the bands, either 1, 3, or 6 'mid': The center frequencies of each band, as a numpy float array 'nom': The nominal frequency array text, as textual output corresponding to the frequencies in x, they are '16', .. up to '16k'
Definition at line 172 of file lasp_slm.py.
lasp.lasp_slm.SLM.run | ( | self, | |
data | |||
) |
Add new fresh timedata to the Sound Level Meter.
Args: data: one-dimensional input data
Definition at line 141 of file lasp_slm.py.
lasp.lasp_slm.SLM.fbdesigner |
Definition at line 61 of file lasp_slm.py.
lasp.lasp_slm.SLM.fs_slm |
Definition at line 136 of file lasp_slm.py.
lasp.lasp_slm.SLM.include_overall |
Definition at line 77 of file lasp_slm.py.
lasp.lasp_slm.SLM.N |
Definition at line 139 of file lasp_slm.py.
lasp.lasp_slm.SLM.nom_txt |
Definition at line 91 of file lasp_slm.py.
lasp.lasp_slm.SLM.offset_t |
Definition at line 78 of file lasp_slm.py.
lasp.lasp_slm.SLM.slm |
Definition at line 128 of file lasp_slm.py.
lasp.lasp_slm.SLM.xs |
Definition at line 72 of file lasp_slm.py.