Download latest PDF - Read the Docs

Transcript
Brian Documentation, Release 1.5dev
passband, stopband The edges of the pass and stop bands in Hz. For lowpass and highpass filters,
in the case of similar filters for each channel, they are scalars and passband<stopband for low pass
or stopband>passband for a highpass. For a bandpass or bandstop filter, in the case of similar filters for each channel, make passband and stopband a list with two elements, e.g. for a bandpass
have passband=[200*Hz, 500*Hz] and stopband=[100*Hz, 600*Hz]. passband and
stopband can also be arrays of shape (1, nchannels) for low and high pass or (2, nchannels)
for stopband and passband yielding different filters along channels.
gpass The maximum loss in the passband in dB. Can be a scalar or an array of length nchannels.
gstop The minimum attenuation in the stopband in dB. Can be a scalar or an array of length nchannels.
btype One of ‘low’, ‘high’, ‘bandpass’ or ‘bandstop’.
ftype The type of IIR filter to design: ‘ellip’ (elliptic), ‘butter’ (Butterworth), ‘cheby1’ (Chebyshev I),
‘cheby2’ (Chebyshev II), ‘bessel’ (Bessel).
class brian.hears.Butterworth(source, nchannels, order, fc, btype=’low’)
Filterbank of low, high, bandstop or bandpass Butterworth filters. The cut-off frequencies or the band frequencies can either be the same for each channel or different along channels.
Initialisation parameters:
samplerate Sample rate.
nchannels Number of filters in the bank.
order Order of the filters.
fc Cutoff parameter(s) in Hz. For the case of a lowpass or highpass filterbank, fc is either a scalar (thus the
same value for all of the channels) or an array of length nchannels. For the case of a bandpass or
bandstop, fc is either a pair of scalar defining the bandpass or bandstop (thus the same values for all of
the channels) or an array of shape (2, nchannels) to define a pair for every channel.
btype One of ‘low’, ‘high’, ‘bandpass’ or ‘bandstop’.
class brian.hears.Cascade(source, filterbank, n)
Cascade of n times a linear filterbank.
Initialised with arguments:
source Source of the new filterbank.
filterbank Filterbank object to be put in cascade
n Number of cascades
class brian.hears.LowPass(source, fc)
Bank of 1st-order lowpass filters
The code is based on the code found in the Meddis toolbox. It was implemented here to be used in the DRNL
cochlear model implementation.
Initialised with arguments:
source Source of the filterbank.
fc Value, list or array (with length = number of channels) of cutoff frequencies.
class brian.hears.AsymmetricCompensation(source, f, b=1.019, c=1, ncascades=4)
Bank of asymmetric compensation filters.
Those filters are meant to be used in cascade with gammatone filters to approximate gammachirp filters (Unoki et
al., 2001, Improvement of an IIR asymmetric compensation gammachirp filter, Acoust. Sci. & Tech.). They are
8.21. Brian hears
325