bin_llcl

This IDL facility provides a means to bin an angular power spectrum into arbitrary bins.

Location in HEALPix directory tree: src/idl/misc/bin_llcl.pro 


FORMAT

IDL> BIN_LLCL, Llcl_in, Bin, L_out, Llcl_out, [Dllcl, DELTAL=, /FLATTEN, /HELP, /UNIFORM]


QUALIFIERS

Llcl_in
1D vector: input power spectrum (given for each l starting at 0).
Bin
input: binning in l to be applied,
–either a scalar interpreted as the step size of a regular binning, the first bins are then {0, bin - 1},{bin, 2bin-1}, $\ldots$
–or a 1D vector, interpreted as the lower bound of each bin, ie the first bins are {bin[0],bin[1]-1}, {bin[1], bin[2]-1}, $\ldots$
L_out
contains on output the center of each bin lb.
Llcl_out
contains on output the binned power spectrum C(b), ie the (weighted) average of the input C(l) over each bin.
Dllcl
optional, contains on output a rough estimate of the rms of the binned C(l) for a full sky observation $C(b) \sqrt{ 2 / ((2l_b+1) \Delta l_b)}$
DELTAL=
optional, contains on output the size of each bin $\Delta l(b)$


KEYWORDS

/FLATTEN
if set, the C(l) is internally multiplied by $l(l+1)/2\pi$ before being binned.
By default, the input Llcl_in is binned as is.
/HELP
if set, an extended help is printed and the code exits.
/UNIFORM
if set, the C(l) in each bin is given the same weight.
By default a weight $\propto 2l+1$ is used (inverse cosmic variance weighting). Note that this weighting affects Llcl_out but not L_out.


DESCRIPTION

bin_llcl bins the input power spectrum (as is, or after flattening by a $l(l+1)/2\pi$ factor) according to an arbitrary binning scheme defined by the user. Different weighting scheme (uniform or inverse variance) can be applied inside the bins.


RELATED ROUTINES

This section lists the routines related to bin_llcl

idl
version 6.4 or more is necessary to run bin_llcl.
fits2cl
facility to read a power spectrum from a FITS file.


EXAMPLE:

init_healpix
fits2cl, cl, !healpix.directory+'/test/cl.fits', multipoles=l
fl = l*(l+1) / (2. * !pi)
bin_llcl, fl*cl[*,0], 10, lb, bbcb, /uniform
plot, l, fl*cl[*,0]
oplot, lb, bbcb, psym = 4
Read a power spectrum, bin it with a binsize of 10 and a uniform weighting, and overplot the input spectrum and its binned version.

Version 3.82, 2022-07-28