....and was pointed out to me by the late Frankin Antonio (lest I take credit for a level of detail-orientation I don't possess)
On Thu, 30 May 2024, 01:46 Andrew Martens, <and...@sarao.ac.za> wrote: > 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> 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://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 >> <https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/MW4P221MB10470D49AF6C96FC1CEA3828BBF32%40MW4P221MB1047.NAMP221.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer> >> . >> > > > > > *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. > 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/CAG1GKSkZrw-wvFBph%2B8SS1O7bGntAk97dSv7ObMJjXcjeF7JLA%40mail.gmail.com.