Hi Andrew, Yes, that version corrects the issue I found. Thanks for confirming.
Regards, Nathan ________________________________ From: casper@lists.berkeley.edu <casper@lists.berkeley.edu> on behalf of Andrew Martens <and...@sarao.ac.za> Sent: Thursday, May 30, 2024 12:46 AM To: casper@lists.berkeley.edu <casper@lists.berkeley.edu> Subject: Re: [casper] pfb_coeff_gen_calc shifted sinc arguments You don't often get email from and...@sarao.ac.za. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> Hi Nathan This bug (if we are talking about the same one) was fixed in a commit 2 years ago but has not made it into the main repo yet. It was pointed out to me by Jack Hickish. For more info see https://github.com/ska-sa/mlib_devel/commit/702d962842b53f76ec661b27b1156679ccb71929 The fixed version is available at https://github.com/ska-sa/mlib_devel/blob/m2021a/casper_library/pfb_coeff_gen_calc.m Cheers Andrew On Thu, May 30, 2024 at 3:11 AM Nathan West <nat...@quadrature.dev<mailto:nat...@quadrature.dev>> wrote: 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://af-south-1.api.getmessagecontrol.com/onprem_image_fetch?dep=DKsFNr%2FdE4ZSNMVbhQo8iA%3D%3D7EjproNhHQf5Q4T%2BaJSmW%2F%2FIQ4KqD8jQHyvFW4CcXivSTWxlLy37%2BIbPAIasHwgPFVyQY8ALjBuYePq6cDIUiGfoFIPPCwhAnA3%2F0Be0AxMFLK6GVMUpA1zbPE254sU69mzmXLrqQr43W70Fckyz4vy28vBYwFz3OUtpi%2BiWCjwAoPpUhcA2o3z1xctZEiWC6DLQsKimqBO%2FPhThx09MJhTwejjqUW6YEIMugFLcmCTU%2FIDAzLLiaB5tlopGU2r7Occbp%2FeUNwG6vSml3w%2BXofzswcvfj7HFMK1n%2FKXPy7I5JBHxYpbDQ7NDQvhXJQXTCruzFPFyfIeTMZaG7ud0IM5qLAo2YaMbPwp2f1g8AnWta7yRw%2FiUNUeFXsGPuQ8t%2FyNpoqb3Yk9Afy%2FLbRC%2BtGE6FmRe38NYm1Zd3HJ0z7SJFxvwhHVN1uiKMHJtpFpxjbV4z1clPu3W0qgRGC74Iw%3D%3D]<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<http://github.com> -- You received this message because you are subscribed to the Google Groups "casper@lists.berkeley.edu<mailto: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<mailto: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<https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/MW4P221MB10470D49AF6C96FC1CEA3828BBF32%40MW4P221MB1047.NAMP221.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>. [https://af-south-1.api.getmessagecontrol.com/onprem_image_fetch?dep=MaxgAqX1iOqPHUgkPTZiOA%3D%3DbA4cHSNwB78IBiGDRi8saQgBEooxBYRF2tlSkPm%2F3gX6%2Fg6Ex%2BP6bd%2BchOt%2FXm5eK0CwujoQiJWSHuB%2BhD9Y%2BlTuJfrcULr0bRUs05HkwXEiup2HU7eNf3GqPzp5LWIz%2Fk4KtjZ976i3f2aiJVmn0sMeaUsbfvzwIR%2B56bbW5h5ntVLMDKrQK8Ha9FoT2RPm5WBLIk4nOdDMLUvYoKNjkq4c%2Fcurvln1%2FbZNz2c2xSDpOMjYl7yXgKJgxv8cy33OkF8gNLpAkb2dEh50c5x6vJ4fJOMP4AWL1Y9XImgVUQQFz%2B7RMpf3mhFkiXZ0mLNJv9T8OUARhTETArBS1aakB2e83hLTqRcOHRn6h6Gp4QA%3D] Disclaimer The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful. -- 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<mailto:casper+unsubscr...@lists.berkeley.edu>. To view this discussion on the web visit https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CADEwHTeL4C6SxvLKmaM42Vg8F83ZQmFQGXMYJ0568F9qwr5iwA%40mail.gmail.com<https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CADEwHTeL4C6SxvLKmaM42Vg8F83ZQmFQGXMYJ0568F9qwr5iwA%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- 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/PH8P221MB1037744BC1B0298564B21748BBF32%40PH8P221MB1037.NAMP221.PROD.OUTLOOK.COM.