Hi all,

I was comparing the coarse channelization response and taps from a CASPER 
instrument to other window design routines and noticed a small discrepancy 
comparing to pfb_coeff_gen_calc.

The argument to the sinc to generate an ideal lowpass filter is typically 
-wc..wc. Different routines get the range in a few ways, but sticking with the 
matlab version in 
https://github.com/casper-astro/mlib_devel/blob/a557a844f8421f9860876b0216dd6758508d8f2e/casper_library/pfb_coeff_gen_calc.m#L23C25-L23C43
 it would typically be something like [0:alltaps-1]/alltaps - (alltaps-1)/2​ to 
give a range of -(alltaps-1)/2 : (alltaps-1)/2​ inclusive. That would then be 
scaled by the cutoff which is included in this routine as 1/(2^PFBSize).

Including the cutoff factor, to sample -wc:wc would normally be
[0:alltaps-1]/(TotalTaps*2^PFBSize) - (TotalTaps*2^PFBSize)/2​

This is very slightly shifted version used in the casper routine by a delay of 
1/(2*2^PFBSize)​. The casper shifted version is guaranteed to produce a leading 
0 since the equivalent TotalTaps*2^(PFBSize-1) will always be an integer but 
produces slightly different taps than standard routines. Anyway, I was mostly 
hoping someone might help me understand the design choice a little more or if 
it's actually a bug.

Thanks,
Nathan
[https://opengraph.githubassets.com/621d89ff4f6c68aa4ea7560ab1cb6b11686781ae6b7f5d3fb421d69b68ecfbb7/casper-astro/mlib_devel]<https://github.com/casper-astro/mlib_devel/blob/a557a844f8421f9860876b0216dd6758508d8f2e/casper_library/pfb_coeff_gen_calc.m#L23C25-L23C43>
mlib_devel/casper_library/pfb_coeff_gen_calc.m at 
a557a844f8421f9860876b0216dd6758508d8f2e · 
casper-astro/mlib_devel<https://github.com/casper-astro/mlib_devel/blob/a557a844f8421f9860876b0216dd6758508d8f2e/casper_library/pfb_coeff_gen_calc.m#L23C25-L23C43>
Contribute to casper-astro/mlib_devel development by creating an account on 
GitHub.
github.com



-- 
You received this message because you are subscribed to the Google Groups 
"casper@lists.berkeley.edu" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to casper+unsubscr...@lists.berkeley.edu.
To view this discussion on the web visit 
https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/MW4P221MB10470D49AF6C96FC1CEA3828BBF32%40MW4P221MB1047.NAMP221.PROD.OUTLOOK.COM.

Reply via email to