pydsm.NTFdesign.filter_based.quantization_noise_gain

pydsm.NTFdesign.filter_based.quantization_noise_gain(NTF, H, H_type='zpk', **options)

Compute the quantization noise power gain after a filter

Deprecated since version 0.11.0: Use pydsm.NTFdesign.quantization_noise_gain(). Note that the interface is slightly different.

Parameters:

NTF : tuple

NTF definition in zpk or nd form

H : tuple or callable or array_like

output filter definition in zpk or ba form if H_type=’zpk’ or ‘ba’ (in this case, H is a tuple with 3 or 2 entries); output filter magnitude response if H_type=’mag’ (in this case, H is a callable with argument f in [0,1/2]); output filter impulse response if H_type=’imp’ (in this case, H is an array)

H_type : str

type of specification for parameter H. One of: ‘zpk’, ‘ba’, ‘mag’ or ‘imp’

Returns:

a : real

noise power gain

Other Parameters:
 

quad_opts : dictionary, optional

Parameters to be passed to the quad function used internally as an integrator. Allowed options are epsabs, epsrel, limit, points. Do not use other options since they could break the integrator in unexpected ways. Defaults can be set by changing the function default_options attribute.

Raises:

ValueError

‘Incorrect filter type specification’ if the filter is not specified correctly.

See also

scipy.integrate.quad
for the meaning of the integrator parameters.

Notes

In the default case the computation is practiced as

2\int_{f=0}^{\frac{1}{2}}
\left|H\left(\mathrm{e}^{\mathrm{i} 2\pi f}\right)\right|^2
\left|\mathit{NTF}
\left(\mathrm{e}^{\mathrm{i} 2\pi f}\right)\right|^2 df