Open ntessore opened 2 months ago
Using the expressions for pixel boundaries from Gorski et al. (2005), I think it can be shown that the largest diagonal is just inside the northern polar region, next to the zero meridian. This appears to agree with Fig. 3.
According to Section 4.1, the ring index is $i = N{\rm side}$, and the pixel-in-ring index is $j = 1$ (note that the stated bounds for $i$ appear to be incorrect, since $N{\rm side} = 1$ cannot work). Using (4) and (5), the pixel centre is hence $z = \frac{2}{3}$ and $\phi = \frac{\pi}{4 N_{\rm side}}$.
According to Fig. 9, the northern vertex of said pixel is $v(k, k')$. Since $\phiv(k, k') = 0$, it follows that $k = 0$ by (A8). Furthermore, since the eastern vertex $v(k+1, k')$ is due north of the pixel with $i = N{\rm side} + 1, j = 1$, it follows that $\phiv(k+1, k') = \frac{\pi}{2 N{\rm side}}$, and hence $k' = N_{\rm side} - 1$ by (A8). Using (A7), the northern pixel vertex is hence at $zv(k, k') = 1 - \frac{1}{3} \bigl(\frac{N{\rm side} - 1}{N_{\rm side}}\bigr)^2$ and $\phiv(k, k') = 0$. This holds even for $N{\rm side} = 1$.
The maximum pixel radius is then the angular distance between $(z, \phi)$ and $(z_v, \phi_v)$.
Add a function to return the maximum radius of HEALPix pixels at a given NSIDE.