Skip to content

cwru-pat/cmb-multipole_vectors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VERSION 1.30

C implementation:

An implementation of the multipole direction decomposition as outlined in
C.J. Copi, D. Huterer, and G.D. Starkman, Phys. Rev. D, 70, 043515 (2004).
This solves the coupled set of quadratic equations in equation (A3) from
Appendix A of that paper.  The equations are solved using routines from the
gsl library.  It has most recently been tested with gsl version 1.16,
though should work with much older versions.  See
http://www.gnu.org/software/gsl/ for more information.  You must have this
library installed to use the implementation provided here.

The code is released under a BSD license (see source files for exact
terms).  Note that it relies upon gsl which is released under the GNU
General Public License which may place other restrictions on your usage.
This implementation is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.

The two main files are

mpd_decomp.h:
  includes the definitions of important structures and prototypes of the
  important routines.

mpd_decomp.c:
  includes the source code for the routines and some internal routines
  useful for the decomposition.

The simplest routine to use is mpd_decomp_full_fit.  This does the full
decomposition of the Lth multipole given the alm.  Since the CMB map is
real valued all the information is given in the 2L+1 coefficients al0 al1re
al1im al2re al2im ... where al1re is the real part of the coeffcient al1,
etc.  An example of using this routine is given in mpd_driver.c.  This
routine makes a number of assumptions and can thus sometimes fail when
doing a decomposition.

The workhorse routine is mpd_decomp_fit.  This routine peels off one
vector, returning the resulting unit vector and rank l-1 symmetric
traceless tensor.  A vector can then be peeled off from this tensor using
the same routine, ..., until we are left with just two vectors.  An example
of this is the mpd_decomp_full_fit routine which is just does the book
keeping for you and relies on mpd_decomp_fit to do the actual
decomposition.


Python version:

The algorithm is also implemented in Python using NumPy and SciPy.

File:
mpd_decomp.py : This serves as both a Python module and stand alone
	        program.  It is run in the same way as the C program.


The latest version and other information on this implementation can always
be found at
https://github.com/cwru-pat/cmb-multipole_vectors

The original site with more, older information still exists at
http://www.phys.cwru.edu/projects/mpvectors/

Questions, bug reports, etc can be sent to
[email protected]
Please make sure you are using the latest version.  Please include the
version of the code your are using (see mpd_decomp.h or mpd_decomp.py).

Changes:
  19 Jun 2006 : (v1.9) Fixed a memory leak in mpd_decomp_vector_create.
                (Found by Bjarne Thomsen)
  27 Jun 2006 : (v1.10) Changed the normalization.  A^l may be correct
                now.  It seems to be correct for quadrupoles.  Also changed
		all size_t to unsigned int.
  27 Jun 2006 : (v1.11) Changed the normalization again.  Now A^l is
                correct for alm = delta_{m,0}.
  16 Sep 2007 : (v1.12) Fixed memory leak in mpd_decomp_full_fit.
                (Found by Cristian Armendariz-Picon)
  06 Jul 2016 : (v1.20) Removed the equations for the 'b'. 
                These were redundant and not used for anything.
                They just wasted memory and computational time!
                Updated documentation,including reference to the Python implementation.
  24 Jul 2023 : (v1.30) Modernize the python implementation.
                Use Python3, f-strings, and fix some spacing.
                Add mpd_decomp_healpy_alm convenience function usable when healpy is installed.

About

Multipole Vector formalism

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published