LASP 1.0
Library for Acoustic Signal Processing
Loading...
Searching...
No Matches
lasp.lasp_weighcal.WeighCal Class Reference

Frequency weighting and calibration FIR filter. More...

Public Member Functions

 __init__ (self, fw=FreqWeighting.default, nchannels=1, fs=48000., calfile=None)
 Initialize the frequency weighting and calibration FIR filters.
 
 filter_ (self, data)
 Filter data using the calibration and frequency weighting filter.
 
 frpCalObj (self, freq_design)
 Computes the objective frequency response of the calibration filter.
 
 frpWeightingObj (self, freq_design)
 Computes the objective frequency response of the frequency weighting filter.
 
 frpObj (self, freq_design)
 Combines the frequency weighting and the calibration filter into one frequency response objective function.
 
 freqResponse (self, chan=0, freq=None)
 Returns the frequency response of the designed FIR filter.
 

Public Attributes

 nchannels
 
 fs
 
 fw
 
 calfile
 

Protected Attributes

 _firs
 
 _fbs
 
 _freq_design
 

Detailed Description

Frequency weighting and calibration FIR filter.

Definition at line 16 of file lasp_weighcal.py.

Constructor & Destructor Documentation

◆ __init__()

lasp.lasp_weighcal.WeighCal.__init__ (   self,
  fw = FreqWeighting.default,
  nchannels = 1,
  fs = 48000.,
  calfile = None 
)

Initialize the frequency weighting and calibration FIR filters.

Args: fw: Frequency weighting to apply nchannels: Number of channels for the input data fs: Sampling frequency [Hz] calfile: Calibration file to load.

Definition at line 21 of file lasp_weighcal.py.

Member Function Documentation

◆ filter_()

lasp.lasp_weighcal.WeighCal.filter_ (   self,
  data 
)

Filter data using the calibration and frequency weighting filter.

Args: data: (Weighted) raw time data that needs to be filtered, should have the same number of columns as the number of channels. First axis is assumed to be the time axis

Retuns: Filtered data for each channel

Definition at line 62 of file lasp_weighcal.py.

◆ freqResponse()

lasp.lasp_weighcal.WeighCal.freqResponse (   self,
  chan = 0,
  freq = None 
)

Returns the frequency response of the designed FIR filter.

Definition at line 139 of file lasp_weighcal.py.

◆ frpCalObj()

lasp.lasp_weighcal.WeighCal.frpCalObj (   self,
  freq_design 
)

Computes the objective frequency response of the calibration filter.

Definition at line 88 of file lasp_weighcal.py.

◆ frpObj()

lasp.lasp_weighcal.WeighCal.frpObj (   self,
  freq_design 
)

Combines the frequency weighting and the calibration filter into one frequency response objective function.

Definition at line 127 of file lasp_weighcal.py.

◆ frpWeightingObj()

lasp.lasp_weighcal.WeighCal.frpWeightingObj (   self,
  freq_design 
)

Computes the objective frequency response of the frequency weighting filter.

Definition at line 112 of file lasp_weighcal.py.

Member Data Documentation

◆ _fbs

lasp.lasp_weighcal.WeighCal._fbs
protected

Definition at line 51 of file lasp_weighcal.py.

◆ _firs

lasp.lasp_weighcal.WeighCal._firs
protected

Definition at line 50 of file lasp_weighcal.py.

◆ _freq_design

lasp.lasp_weighcal.WeighCal._freq_design
protected

Definition at line 60 of file lasp_weighcal.py.

◆ calfile

lasp.lasp_weighcal.WeighCal.calfile

Definition at line 39 of file lasp_weighcal.py.

◆ fs

lasp.lasp_weighcal.WeighCal.fs

Definition at line 36 of file lasp_weighcal.py.

◆ fw

lasp.lasp_weighcal.WeighCal.fw

Definition at line 37 of file lasp_weighcal.py.

◆ nchannels

lasp.lasp_weighcal.WeighCal.nchannels

Definition at line 35 of file lasp_weighcal.py.


The documentation for this class was generated from the following file: