README.org 3.48 KB
Newer Older
Maude Le Jeune's avatar
Maude Le Jeune committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#+TITLE: Needlet ILC tool
#+STYLE: <link rel="stylesheet" type="text/css" href="org.css" />
#+AUTHOR: M. Le Jeune
#+DATE: 2011-01-05 13:58:59 CET
#+EMAIL: lejeune@apc.univ-paris7.fr

The Needlet ILC tool is simple binary aimed at performing Internal
Linear Combination (ILC) of Healpix maps.
'Needlet' stands for spherical wavelet, as it offers the possibility
to perform ILC in the needlet analysis domain. 
It can also be used in the simplest case of pixel domain analysis as
described below. 

* Installation

Maude Le Jeune's avatar
Maude Le Jeune committed
16 17
** Dependencies

Maude Le Jeune's avatar
Maude Le Jeune committed
18 19 20 21 22
The NILC tool relies on the *Healpix* C++ library
 (http://healpix.jpl.nasa.gov/) and the *spherelib* library which
 extends the Healpix package with needlet analysis and filtering
 routines.

Maude Le Jeune's avatar
Maude Le Jeune committed
23 24
Those two libraries are provided with the NILC source code but it is
possible to use a local version of the Healpix library.
Maude Le Jeune's avatar
Maude Le Jeune committed
25

Maude Le Jeune's avatar
Maude Le Jeune committed
26
The NILC tool also uses the *GSL* library. 
Maude Le Jeune's avatar
Maude Le Jeune committed
27

Maude Le Jeune's avatar
Maude Le Jeune committed
28
** Installing the NILC tool
Maude Le Jeune's avatar
Maude Le Jeune committed
29

Maude Le Jeune's avatar
Maude Le Jeune committed
30
*** Compiling Healpix
Maude Le Jeune's avatar
Maude Le Jeune committed
31

Maude Le Jeune's avatar
Maude Le Jeune committed
32 33
A recent version of the Healpix library is provided with the source
under the =healpix= directory.
Maude Le Jeune's avatar
Maude Le Jeune committed
34

Maude Le Jeune's avatar
Maude Le Jeune committed
35
Change to this directory and run:
Maude Le Jeune's avatar
Maude Le Jeune committed
36

Maude Le Jeune's avatar
Maude Le Jeune committed
37
 =HEALPIX_TARGET=generic_gcc; make=  
Maude Le Jeune's avatar
Maude Le Jeune committed
38

Maude Le Jeune's avatar
Maude Le Jeune committed
39 40
The Healpix compilation step will be included to the main construction
script in the near future.
Maude Le Jeune's avatar
Maude Le Jeune committed
41

Maude Le Jeune's avatar
Maude Le Jeune committed
42
*** Compiling the NILC binary
Maude Le Jeune's avatar
Maude Le Jeune committed
43

Maude Le Jeune's avatar
Maude Le Jeune committed
44
Change directory to root and run:  
Maude Le Jeune's avatar
Maude Le Jeune committed
45

Maude Le Jeune's avatar
Maude Le Jeune committed
46 47 48 49 50 51 52 53
 =./waf configure --with-healpix=path/to/healpix --prefix=my/prefix/path=
 =./waf build=

To clean up after a build: 
 =./waf clean=

To install the binary: 
 =./waf install=
Maude Le Jeune's avatar
Maude Le Jeune committed
54 55 56 57 58 59 60 61 62

Default prefix is '/usr/local'.


** Running the NILC tool

A simple test can be run using the simulated data provided with the
NILC package: 

Maude Le Jeune's avatar
Maude Le Jeune committed
63 64 65
 =cd nilc=
 =./nilc fullsky.param=
 
Maude Le Jeune's avatar
Maude Le Jeune committed
66 67 68 69 70 71 72 73 74 75 76 77


* Pixel based ILC

The NILC tool can be used for pixel-based analysis performed:
+ on the full sky;
+ on a patch or using a galactic mask;
+ on a set of pixel zones.

** Full sky analyis

In this case, input parameters are minimum as in this simple example: 
Maude Le Jeune's avatar
Maude Le Jeune committed
78
[[file:./nilc/fullsky.param]]
Maude Le Jeune's avatar
Maude Le Jeune committed
79 80 81 82 83 84 85 86

** Patch analysis


In order to exclude a zone of the analysis, one can define a binary
mask which is an Healpix map with pixel equal to 0 in the excluded
zone and 1 elsewhere:

Maude Le Jeune's avatar
Maude Le Jeune committed
87 88
file:./nilc/patch.param

Maude Le Jeune's avatar
Maude Le Jeune committed
89 90 91 92 93 94 95

** Localized analysis

In order to performed a space localized ILC, this Healpix map can be
used to define more pixel zones. 
In this case, each pixel is set to its zone number starting from 1:

Maude Le Jeune's avatar
Maude Le Jeune committed
96
file:./nilc/grid.param
Maude Le Jeune's avatar
Maude Le Jeune committed
97 98 99 100 101 102 103 104 105 106


* Needlet ILC

The Needlet ILC is based on the possibility to localized the
statistics over both space and spectral domains.  

The spectral localisation is made available through the use of spline
window functions. Window function limits are set in a vector with the
following convention: 
Maude Le Jeune's avatar
Maude Le Jeune committed
107

Maude Le Jeune's avatar
Maude Le Jeune committed
108 109 110 111 112 113 114
 =bands=[lmin_0 lmin_1 lmin_2...lmin_J lmin_J-1 lmax_J]=
with =lmax_j-2=lmin_j=. 

The space localisation uses the same convention as described in the
previous section, except that one has to define as many Healpix zone
maps as needlet scales (J in this example). 

Maude Le Jeune's avatar
Maude Le Jeune committed
115
file:./nilc/needlet.param
Maude Le Jeune's avatar
Maude Le Jeune committed
116 117 118 119 120 121 122 123 124 125 126 127


* More options

+ Input files are Healpix map by default. It is possible to use alm
  files instead by setting the option almopt to =true=. In this case,
  one has to specify which resolution will be used for the output map
  with the =nside= parameter.
+ Spherical harmonic transforms can be tuned with the =n_iter=
  parameter.
+ One can use command line options instead of parameter file: 
 + In the pixel based case: 
Maude Le Jeune's avatar
Maude Le Jeune committed
128

Maude Le Jeune's avatar
Maude Le Jeune committed
129
   =nilc -p outfile -z zonefile N infile1 coeff1 ... infileN coeffN=
Maude Le Jeune's avatar
Maude Le Jeune committed
130

Maude Le Jeune's avatar
Maude Le Jeune committed
131
 + In the needlet case:
Maude Le Jeune's avatar
Maude Le Jeune committed
132

Maude Le Jeune's avatar
Maude Le Jeune committed
133
   =nilc outfile l0 J zonefile1 lmax1 ... zonefileJ lmaxJ N infile1 coeff1 ... infileN coeffN=
Maude Le Jeune's avatar
Maude Le Jeune committed
134