pydsm.NTFdesign.filter_based.q0_from_filter

pydsm.NTFdesign.filter_based.q0_from_filter(P, H, H_type='zpk', **options)

Compute Q matrix from the modulator output filter

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

Parameters
Pint

order of the FIR to be eventually synthesized

Htuple or array_like or callable

output filter description. This is given by a zpk or ba form if F_type is ‘zpk’ or ‘ba’. It is a magnitude response (function of f, with f in [0,1/2]) if F_type is ‘mag’. It is an impulse response if F_type is ‘imp’.

H_typestr

string indicating how F is expressed. Can be ‘zpk’, ‘ba’, ‘mag’ or ‘imp’

Returns
q0ndarray

the first row of the matrix Q used in the NTF optimization

Other Parameters
quad_optsdictionary, 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

The Q matrix being synthesized has (P+1) times (P+1) entries.