Papers
Topics
Authors
Recent
Search
2000 character limit reached

Healpy fit_dipole: Cosmic Dipole Estimator

Updated 12 July 2026
  • healpy.fit_dipole is a least-squares estimator that fits a monopole+dipole model to HEALPix pixelized number-count maps.
  • It accurately recovers the cosmic dipole vector in its native Cartesian form but exhibits increased variance with reduced sky coverage.
  • Transforming the unbiased Cartesian estimates to spherical coordinates can introduce apparent biases in amplitude and direction.

Searching arXiv for the specified paper and closely related context. arxiv_search.query({"search_query":"ti:\"Cosmic Multipoles in Galaxy Surveys II: Comparing Different Methods in Assessing the Cosmic Dipole\" OR id:(Mittal et al., 25 Sep 2025)","start":0,"max_results":5,"sort_by":"submittedDate","sort_order":"descending"}) healpy.fit_dipole denotes, in the comparative framework of "Cosmic Multipoles in Galaxy Surveys II: Comparing Different Methods in Assessing the Cosmic Dipole" (Mittal et al., 25 Sep 2025), a monopole+dipole least-squares estimator applied to a pixelized sky map of source number densities. In that treatment, the algorithm is used to determine the number count dipole from cosmological surveys and is analyzed as a representative estimator-based alternative to a Bayesian dipole analysis. The central result is that the estimator is unbiased in its native Cartesian parameterization of the dipole vector, but that its variance becomes large for low sky coverage, so practical reliability degrades in that regime. The same study further shows that apparent biases in dipole amplitude and direction can arise when outputs are transformed to spherical parameters and averaged there, even when the underlying Cartesian estimator remains unbiased (Mittal et al., 25 Sep 2025).

1. Problem setting and fitted sky model

The algorithm is applied to a HEALPix map of pixelized number-count density,

Ninumber density / counts in pixel i,\mathcal N_i \equiv \text{number density / counts in pixel } i,

with pixel ii centered on the unit-vector direction

p^i=(xi,yi,zi).\hat{\mathbf p}_i = (x_i,y_i,z_i).

In the simulations used for comparison, the sky is pixelized with nside = 64, giving

npix=49152n_{\rm pix} = 49152

equal-area pixels. The quantity of interest is the dipole modulation of the number-count map, represented internally by four coefficients,

(A0,A1,A2,A3),(A_0, A_1, A_2, A_3),

where A0A_0 is the monopole or mean number density and (A1,A2,A3)(A_1,A_2,A_3) are the Cartesian dipole components of the modulated count field (Mittal et al., 25 Sep 2025).

The assumed sky model is a linear monopole+dipole field on the sphere,

NiA0+A1xi+A2yi+A3zi,\mathcal N_i \approx A_0 + A_1 x_i + A_2 y_i + A_3 z_i,

or equivalently

N(p^)=A0[1+Dp^].\mathcal N(\hat{\mathbf p}) = A_0 \left[1 + \mathbf{\mathcal D}\cdot \hat{\mathbf p}\right].

The inferred dimensionless dipole vector is

D=(A1A0,A2A0,A3A0)(Dx,Dy,Dz).\mathbf{\mathcal D} = \left(\frac{A_1}{A_0}, \frac{A_2}{A_0}, \frac{A_3}{A_0}\right) \equiv (\mathcal D_x,\mathcal D_y,\mathcal D_z).

This formulation places the estimator squarely within the standard first-order dipolar modulation model for number-count dipoles.

The paper also situates the fitted field in the broader cosmological dipole problem. The expected kinematic number-count modulation is quoted as

ii0

where ii1 is the line-of-sight unit vector, ii2 is the observer velocity, ii3 is the speed of light, ii4 is the slope of cumulative counts ii5, and ii6 is the spectral index defined by ii7. In this setting, the increase in discordance between the number count dipole and the CMB's kinematic dipole motivates a careful comparison of methods for dipole determination.

2. Least-squares formulation and regression structure

In the study, fit_dipole is explicitly interpreted as a least-squares estimator and, under Gaussian residual assumptions with uninformative priors, as the maximum of a Gaussian likelihood and the posterior mode. Its objective function is

ii8

with the sum taken over unmasked pixels only. The stationarity equations are written as

ii9

where p^i=(xi,yi,zi).\hat{\mathbf p}_i = (x_i,y_i,z_i).0. This is the normal-equations form of an ordinary linear least-squares problem (Mittal et al., 25 Sep 2025).

Appendix A rewrites the fit in matrix form as

p^i=(xi,yi,zi).\hat{\mathbf p}_i = (x_i,y_i,z_i).1

with

p^i=(xi,yi,zi).\hat{\mathbf p}_i = (x_i,y_i,z_i).2

p^i=(xi,yi,zi).\hat{\mathbf p}_i = (x_i,y_i,z_i).3

and

p^i=(xi,yi,zi).\hat{\mathbf p}_i = (x_i,y_i,z_i).4

This makes the connection to linear regression explicit: the fitted basis is p^i=(xi,yi,zi).\hat{\mathbf p}_i = (x_i,y_i,z_i).5, with design-matrix rows p^i=(xi,yi,zi).\hat{\mathbf p}_i = (x_i,y_i,z_i).6.

For a full, sufficiently symmetric sky, the paper notes the approximations

p^i=(xi,yi,zi).\hat{\mathbf p}_i = (x_i,y_i,z_i).7

so that p^i=(xi,yi,zi).\hat{\mathbf p}_i = (x_i,y_i,z_i).8 becomes approximately diagonal. In that case,

p^i=(xi,yi,zi).\hat{\mathbf p}_i = (x_i,y_i,z_i).9

Substituting the exact dipole template recovers the input dipole vector in the noiseless full-sky case, which clarifies why the method is unbiased in that limit.

3. Parameterization, coordinate transformation, and simulation setup

The template map used in the simulations is

npix=49152n_{\rm pix} = 491520

where npix=49152n_{\rm pix} = 491521 is the mean counts per pixel, npix=49152n_{\rm pix} = 491522 is the dipole amplitude, and npix=49152n_{\rm pix} = 491523 is the angular separation between pixel npix=49152n_{\rm pix} = 491524 and the dipole direction. Writing the dipole direction as

npix=49152n_{\rm pix} = 491525

and the pixel direction as

npix=49152n_{\rm pix} = 491526

one has

npix=49152n_{\rm pix} = 491527

so

npix=49152n_{\rm pix} = 491528

This identifies

npix=49152n_{\rm pix} = 491529

The natural estimator outputs are therefore the Cartesian dipole components (A0,A1,A2,A3),(A_0, A_1, A_2, A_3),0 rather than spherical amplitude-direction coordinates (Mittal et al., 25 Sep 2025).

The corresponding spherical parameters are

(A0,A1,A2,A3),(A_0, A_1, A_2, A_3),1

(A0,A1,A2,A3),(A_0, A_1, A_2, A_3),2

with

(A0,A1,A2,A3),(A_0, A_1, A_2, A_3),3

The paper stresses that Cartesian space is the correct parameterization in which to study bias and covariance, because the mapping to (A0,A1,A2,A3),(A_0, A_1, A_2, A_3),4 is nonlinear.

The main benchmark simulations adopt the following settings: nside = 64, (A0,A1,A2,A3),(A_0, A_1, A_2, A_3),5 pixels, mean count per pixel

(A0,A1,A2,A3),(A_0, A_1, A_2, A_3),6

fiducial dipole amplitude

(A0,A1,A2,A3),(A_0, A_1, A_2, A_3),7

and fiducial direction

(A0,A1,A2,A3),(A_0, A_1, A_2, A_3),8

corresponding to the CMB dipole direction. Noisy realizations are generated by Poisson sampling,

(A0,A1,A2,A3),(A_0, A_1, A_2, A_3),9

The fitted maps are therefore pixelized number-count maps contaminated primarily by Poisson shot noise, even though the least-squares objective corresponds to Gaussian residual assumptions.

4. Masking, coverage dependence, and frequentist behavior

The estimator is run on masked HEALPix maps by setting masked pixels to UNSEEN. The study tests Galactic plane masks with

A0A_00

equatorial polar-cap masks with radii

A0A_01

and a discontinuous survey mask comprising many small patches below declination A0A_02. For the discontinuous case, the mean count per pixel is increased to

A0A_03

specifically to study sparse or discontinuous sky coverage at high number density. The estimator analysis uses

A0A_04

mock catalogs for each mask scenario (Mittal et al., 25 Sep 2025).

The central frequentist result is that healpy.fit_dipole is unbiased in its native Cartesian dipole-vector parameterization. The paper states that

A0A_05

is consistent with the true dipole vector across different noise levels, different sky coverages, and different mask shapes tested in the analysis. In the noiseless case, the appendix argues that the estimator recovers the true dipole exactly, with negligible variance, even with masks.

That conclusion is sharply qualified by the estimator variance. For sufficient sky coverage, the variance is small and the recovered amplitudes and directions are tightly centered on the truth. As sky coverage decreases, the variance grows strongly. The abstract emphasizes that, although the estimator gives unbiased results regardless of noise levels and sky coverage, low sky coverage leads to large variance and therefore practical unreliability. For Galactic masks, the discussion highlights a critical regime around

A0A_06

where the estimator variance is large. For equatorial caps, large A0A_07 values produce amplitude distributions shifted high and a bimodal direction distribution clustering near the two equatorial poles.

The discontinuous high-density benchmark is an important counterexample to a simplistic geometry-based interpretation. In that case, estimator outputs remain low-variance, both averaging methods agree with the truth, and the estimator is effectively unbiased and reliable. This suggests that sky geometry alone is not fatal; the decisive quantity is the effective information content, especially sky coverage together with count density.

5. Apparent bias in spherical coordinates

A recurrent misconception addressed in the paper is the claim that fit_dipole is intrinsically biased because average recovered amplitudes and directions can drift away from the injected truth. The study argues that this effect is largely a parameterization artifact. If one converts each realization from Cartesian dipole components to spherical parameters A0A_08 and then averages amplitude and direction directly, apparent biases emerge: amplitudes shift high, and directions can shift toward structures associated with the mask boundaries, such as the Galactic equator or the equatorial poles (Mittal et al., 25 Sep 2025).

The explanation is the nonlinearity of the transformation

A0A_09

A roughly Gaussian cloud in Cartesian space becomes distorted in spherical coordinates, so in general

(A1,A2,A3)(A_1,A_2,A_3)0

for nonlinear (A1,A2,A3)(A_1,A_2,A_3)1. The paper explicitly uses

(A1,A2,A3)(A_1,A_2,A_3)2

to explain why high-amplitude solutions at low latitudes can still average to the correct (A1,A2,A3)(A_1,A_2,A_3)3-component. The underlying estimator can therefore remain unbiased in Cartesian space even when averages in (A1,A2,A3)(A_1,A_2,A_3)4 appear displaced.

This distinction governs uncertainty propagation as well. The stated procedure is to estimate covariance in Cartesian components first and then transform to spherical coordinates via a Jacobian if needed. Directly reading uncertainty from transformed histograms in (A1,A2,A3)(A_1,A_2,A_3)5 does not correctly represent estimator uncertainty. In that sense, the paper treats Cartesian dipole-vector space as the native inferential space and spherical coordinates as a derived, potentially misleading summary representation.

6. Relation to Bayesian dipole analysis and methodological limits

The Bayesian comparison is based on the dipole model

(A1,A2,A3)(A_1,A_2,A_3)6

normalized over the observed sky as

(A1,A2,A3)(A_1,A_2,A_3)7

The likelihood is

(A1,A2,A3)(A_1,A_2,A_3)8

with (A1,A2,A3)(A_1,A_2,A_3)9 denoting a monopole-only model NiA0+A1xi+A2yi+A3zi,\mathcal N_i \approx A_0 + A_1 x_i + A_2 y_i + A_3 z_i,0 and NiA0+A1xi+A2yi+A3zi,\mathcal N_i \approx A_0 + A_1 x_i + A_2 y_i + A_3 z_i,1 a monopole+dipole model NiA0+A1xi+A2yi+A3zi,\mathcal N_i \approx A_0 + A_1 x_i + A_2 y_i + A_3 z_i,2. The Bayesian approach returns a posterior distribution over NiA0+A1xi+A2yi+A3zi,\mathcal N_i \approx A_0 + A_1 x_i + A_2 y_i + A_3 z_i,3 and permits model comparison through

NiA0+A1xi+A2yi+A3zi,\mathcal N_i \approx A_0 + A_1 x_i + A_2 y_i + A_3 z_i,4

with

NiA0+A1xi+A2yi+A3zi,\mathcal N_i \approx A_0 + A_1 x_i + A_2 y_i + A_3 z_i,5

quoted as “strong support” for a dipole (Mittal et al., 25 Sep 2025).

The comparison clarifies the role of fit_dipole. The estimator solves for a single best-fit vector, is naturally Cartesian, and does not provide built-in model comparison; uncertainty must be assessed by simulations or covariance estimation. By contrast, the Bayesian method uses an explicit likelihood for the count distribution on pixels, returns full posterior distributions, and can become inconclusive when the data are weak. This difference is most consequential at low sky coverage. There, fit_dipole still has unbiased mean in Cartesian space but can yield many high-amplitude realizations because of large variance, whereas Bayesian posteriors broaden and Bayes factors can fall to near zero or negative values. The study emphasizes that such inconclusive Bayesian outcomes safeguard against incorrect conclusions.

The paper also identifies several limitations and failure modes of the estimator. Low sky coverage is the dominant one, because it broadens amplitude distributions, distorts direction distributions, and undermines the reliability of single-realization estimates. Incomplete sky and higher multipoles can also induce power leakage from higher multipoles into the dipole amplitude, with worsening contamination as the masked fraction increases. Finally, fit_dipole is built for a single dipole fit to one map. A joint analysis across multiple catalogs would require a generalized likelihood or different estimator, written abstractly as

NiA0+A1xi+A2yi+A3zi,\mathcal N_i \approx A_0 + A_1 x_i + A_2 y_i + A_3 z_i,6

Accordingly, the paper’s practical recommendation is conditional rather than absolute: healpy.fit_dipole is acceptable and useful when sky coverage is sufficient and the analysis is conducted in Cartesian space, but Bayesian analysis is preferable when sky coverage is poor, when model comparison is required, or when a true multi-sample inference problem is being posed.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Healpy fit_dipole Algorithm.