Open dsvf opened 5 years ago
Thanks for your feedback! I agree that my naming conventions are a bit questionable. For MA filters I decided to keep parameter name N for the total order (as in e.g. number of zeros) obtained by cascading identical stages of simple MA filters with M delays each (not the same as the number of delays inside CIC stages, AFAIK this is either 1 or 2).
Concerning CIC filter, it was probably a bad idea to confuse the user in #149 by saying "well, a MA filter is more or less the same as a CIC filter". Well, it isn't, so it would be better to design a new filter class (that also allows decimation / interpolation) with the parameters R or I (decimation / interpolation ratio resp. order of the comb filter), M (1 or 2, number of delays in the CIC stages) and "stages" (how many times are integrators / comb filters cascaded). What do you think?
I'd like to try some ideas out myself, but I am unable to get pyfda(x) to run from the source. Do you have a short hint on how you start the program itself from the source files?
Did you receive my mail (about a week ago)? Were you able to start pyfda?
No, I did not receive any email. I have now added it to my github profile.
Ah, I see. I've added the info that I tried to mail you to the github project Readme (where it belongs, I guess). Please give it another try and tell me whether you had success.
Thanks! I had an unrelated problem with multiple python versions interfering with each other, but now it works.
Two points to consider when adding a CIC mode to pyfda:
When designing a moving average filter which averages over 10 samples, then the number of delays is obviously only 9 since I can use the latest, non-delayed sample. Setting M to 10 returns an 11-tap FIR filter. When designing a CIC filter, to achieve decimation-by-10, the user would have to set M to 9 to obtain the correct response. It might be advisable to either notify the user about this, use a different name for the input parameter or increment it (internally/silently?)
From what I can find, in CIC filters the parameter "M" denotes the number of delays inside one integrator/differentiator and in most cases is set to 1. The parameter "N" is the number of integrator and differentiator stages. This collides in terminology with the MA filter UI, where "M" is the decimation ratio (off-by-one), and "Stages" is the number of stages (alright).