bccp / nbodykit

Analysis kit for large-scale structure datasets, the massively parallel way
http://nbodykit.rtfd.io
GNU General Public License v3.0
111 stars 60 forks source link

Outlying points in \ell = 4 multipole #665

Open isands17 opened 2 years ago

isands17 commented 2 years ago

Describe the bug

There are several weird features of the power spectrum multipoles when estimated using FFTPower: the first couple of \ell = 4 points seem too large in magnitude (see plot below). These features persist even after averaging over the poles from many different catalogs– the attached plot is for 50 simulations, but it appears for several hundred simulations, with higher values of nmesh (up tonmesh = 1024) as well.

Steps To Reproduce My script is attached. I generate a lognormal catalog, add RSD, remove any galaxies that fall beyond the edges of the box, and then call FFTPower.

Actual behaviour The \ell = 4 pole has a couple of outlying points at large scales (small k).

Expected behaviour \ell = 4 multipole points closer to 0.

Screenshots

Version 3.15

If you suspect the problem is related to a dependency (e.g. Corrfunc, pmesh, or mcfit), then it is useful to report the version of that dependency as well (replacing nbodykit with the package name).

Additional context

This is a simplified version of code for a project to estimate wide-angle effects; the \ell = 4 outliers also occur when using ConvolvedFFT on a catalog with all of the galaxies shifted in the z direction to approximate a fixed LOS.

FFTPower_Debugging debugFFTPower.py.zip

isands17 commented 2 years ago

Hi, I just wanted to follow up on this bug. Let me know if there's any other information I can provide. Thanks so much!

rainwoodman commented 2 years ago

If this affects FFTPower, then the only relevant dependency is pmesh. It is relatively simple, and thus I don't think the error is in the transformations. My recollection on this is that the few large scale modes have very very few number of samples in the bin.

Also, the bin-center may not be very well pinned to the 'optimal' location -- did you plot using the bin center or the average k in the bin? I recall the average k in the bin is computed, but don't recall how to get it. If the plot is using the center of the bin then we will have a bias that scales up with bin_center - , and it won't go away with more samples.

This bias will shrink as you increase the bin size (hence number of samples in a bin) Did you check if changing the bin size this bias goes away faster?

adematti commented 2 years ago

Hi, Indeed, this is probably just the effect of low (k, mu) sampling at k < a couple of times the fundamental frequency. This can be forward-modelled, by multiplying the theory by the (relative) number of modes in fine (k, mu) bins, see e.g. Sec 5.1 of https://arxiv.org/pdf/1607.03150.pdf.