-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apodisation window functions #207
Comments
Hi @lukashergt Ah, good catch on the C1/C2 thing. That is indeed a typo, and I'm very surprised that it hasn't been caught before. Indeed, the definition of the apodisation kernels is not exactly the same as used in Grain et al. 2009 (although they should coincide for small angles -- not sure what value of theta_* your plot corresponds to). The main reason for this is efficiency: calculating angles between two pixels requires taking the arccosine of the dot product between their unit vectors, which is a slow operation. The |
Thanks for the quick reply!
I was using That said, the problem that you are hinting at is that I did not convert my input units from degree to radians in this little mock example...^^' sigma_deg = 1 # in degree
sigma = np.deg2rad(sigma_deg) Now we have a more realistically small apodisation scale (yes, an apodisation scale of over 120 degrees would be rather absurd...) and the plots look the same (except for the C1/C2 confusion...):
I see, I was just a little surprised and got curious (after fooling myself into thinking the difference was bigger than it is...). Thanks! Apologies for the needless confusion... Feel free to close (or keep open if intending to fix the C1/C2 thing). |
OK, great. I'll leave it open, since we should fix the C1/C2 confusion. Thanks for catching that! |
Hi David,
two questions regarding the apodisation options. The documentation for
mask_apodization
lists the following two functions:'C1'
apodisation:'C2'
apodisation:for$x < 1$ and where $x = \sqrt{(1 - \cos(\theta)) / (1 - \cos(\theta_\ast))}$ .
This does not match the cited source (Grain et al. 2009) in two ways:
The naming of C1 and C2 in pymaster appears to be the opposite of the naming in the paper, i.e.:
'C1'
apodisation resembles more equation (31) in the paper which is referred to as the'C2'
apodisation resembles more equation (30) in the paper which is referred to as theIs this just a typo? Or am I maybe missing something subtle?
The equations above match equations (30) and (31) in the paper almost exactly, except for the definition of$x=\theta/\theta_\ast$ .
x
. The paper effectively usesThe difference can be seen in the plot below. The paper definition results in symmetric transitions with a mask value of 0.5 at the half way point. The pymaster doc definition results in an asymmetric transition.
Why is that? Was this shown to perform better?
Cheers,
Lukas
The text was updated successfully, but these errors were encountered: