We derive optimal estimators for the two-, three-, and four-point correlators
of statistically isotropic scalar fields defined on the sphere, such as the
Cosmic Microwave Background temperature fluctuations, allowing for arbitrary
(linear) masking and inpainting schemes. In each case, we give the optimal
unwindowed estimator (obtained via a maximum-likelihood prescription, with an
associated Fisher deconvolution matrix), and an idealized form, and pay close
attention to their efficient computation. For the trispectrum, we include both
parity-even and parity-odd contributions, as allowed by symmetry. The
estimators can include arbitrary weighting of the data (and remain unbiased),
but are shown to be optimal in the limit of inverse-covariance weighting and
Gaussian statistics. The normalization of the estimators is computed via Monte
Carlo methods, with the rate-limiting steps (involving spherical harmonic
transforms) scaling linearly with the number of bins. An accompanying code
package, PolyBin, implements these estimators in Python, and we demonstrate the
estimators' efficacy via a suite of validation tests.Comment: 33 pages, 10 figures, code available at
https://github.com/oliverphilcox/PolyBin. Accepted by Phys. Rev.