Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

order of C_ell different from HEALPIX! #64

Closed
zonca opened this issue Nov 6, 2012 · 3 comments
Closed

order of C_ell different from HEALPIX! #64

zonca opened this issue Nov 6, 2012 · 3 comments
Assignees
Milestone

Comments

@zonca
Copy link
Member

zonca commented Nov 6, 2012

Order of spectra in HEALPIX is .... TE, TB, EB:
http://healpix.jpl.nasa.gov/html/facilitiesnode7.htm

while the order in healpy is .... TE, EB, TB:
https://github.com/healpy/healpy/blob/master/healpy/sphtfunc.py#L79

I fixed the test case on anafast, see related commit.
What is strange is that healpy uses HEALPIX C++ which uses the same convention as the fortran code.

Cyrille, do you have an idea of what might causing this?

@ghost ghost assigned crosset Nov 6, 2012
zonca added a commit that referenced this issue Nov 6, 2012
zonca added a commit that referenced this issue Nov 6, 2012
@crosset
Copy link
Member

crosset commented Nov 7, 2012

Hi,

The order of the spectra is not fixed by the healpix library, but is internal to healpy.

The cross power spectra are put into a symmetric correlation matrix and decomposed into Cholesky form (one for each ell). The matrix can be represented either in diagonal order (first diagonal, then second diagonal, etc.) or in row (=column) order. I chosed the diagonal order (TT, EE, BB, TE, EB, TB), which is the closest to the healpix order.

Note that few months ago, I prepared to standardize to this diagonal order all the related functions (map2alm, alm2map, anafast, synfast, ...), see dicumention of synalm https://github.com/healpy/healpy/blob/master/healpy/sphtfunc.py#L249 (before, the different functions had different conventions....). Actually, internally, the cholesky function still use the row order (hence the need for reordering function : https://github.com/healpy/healpy/blob/master/healpy/sphtfunc.py#L823)

I think we should keep this order, as it allows to compute the cross-spectra of any number of maps (and not necessarily polarization maps, see the 'pol' keyword in anafast : https://github.com/healpy/healpy/blob/master/healpy/sphtfunc.py#L40), or make simulation of correlated maps.

We can add a warning message to make it clear to the user.

What do you think ?

Cyrille.

Le 6 nov. 2012 ? 20:35, Andrea Zonca a ?crit :

Order of spectra in HEALPIX is ....TE, TB, EB:
http://healpix.jpl.nasa.gov/html/facilitiesnode7.htm

while the order in healpy is .... TE, EB, TB:
https://github.com/healpy/healpy/blob/master/healpy/sphtfunc.py#L79

I fixed the test case on anafast, see related commit.
What is strange is that healpy uses HEALPIX C++ which uses the same convention as the fortran code.

Cyrille, do you have an idea of what might causing this?

?
Reply to this email directly or view it on GitHub.

@zonca
Copy link
Member Author

zonca commented Nov 29, 2012

internally we use row order anyway, so I think it would be better to use HealPix order for input/output, as it makes more sense to list them in order of amplitude or importance, and better be compatible with HealPix.

@zonca zonca added this to the 1.12.0 milestone Apr 16, 2018
@zonca
Copy link
Member Author

zonca commented May 27, 2021

see #687

@zonca zonca closed this as completed May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants