Commit a667cc09 authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

readme for python

parent e88204d7
#+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
** Dependencies
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.
Those two libraries are provided with the NILC source code but it is
possible to use a local version of the Healpix library.
The NILC tool also uses the *GSL* library.
** Installing the NILC tool
*** Compiling Healpix
A recent version of the Healpix library is provided with the source
under the =healpix= directory.
Change to this directory and run:
=HEALPIX_TARGET=generic_gcc; make=
The Healpix compilation step will be included to the main construction
script in the near future.
*** Compiling the NILC binary
Change directory to root and run:
=./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=
Default prefix is '/usr/local'.
** Running the NILC tool
A simple test can be run using the simulated data provided with the
NILC package:
=cd nilc=
=./nilc fullsky.param=
* 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:
[[file:./nilc/fullsky.param]]
** 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:
file:./nilc/patch.param
** 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:
file:./nilc/grid.param
* 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:
=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).
file:./nilc/needlet.param
* 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:
=nilc -p outfile -z zonefile N infile1 coeff1 ... infileN coeffN=
+ In the needlet case:
=nilc outfile l0 J zonefile1 lmax1 ... zonefileJ lmaxJ N infile1 coeff1 ... infileN coeffN=
#+TITLE: Needlet ILC tool #+TITLE: spherelib
#+STYLE: <link rel="stylesheet" type="text/css" href="org.css" /> #+STYLE: <link rel="stylesheet" type="text/css" href="org.css" />
#+AUTHOR: M. Le Jeune #+AUTHOR: M. Le Jeune
#+DATE: 2011-01-05 13:58:59 CET #+DATE: 2013-02-21 13:58:59 CET
#+EMAIL: lejeune@apc.univ-paris7.fr #+EMAIL: lejeune@apc.univ-paris7.fr
The Needlet ILC tool is simple binary aimed at performing Internal The spherelib package extends the healpix functionnalities. It includes:
Linear Combination (ILC) of Healpix maps. + a c++ librabry (/lib)
'Needlet' stands for spherical wavelet, as it offers the possibility + a python package (/python)
to perform ILC in the needlet analysis domain. + a needlet ilc binary (/nilc) See NILC_README.org for more info
It can also be used in the simplest case of pixel domain analysis as
described below.
* Installation * Installation of the python package
** Dependencies ** Dependencies
The NILC tool relies on the *Healpix* C++ library The spherelib python package relies on healpy (https://github.com/healpy/healpy).
(http://healpix.jpl.nasa.gov/) and the *spherelib* library which The healpy package has to be installed separately.
extends the Healpix package with needlet analysis and filtering
routines.
Those two libraries are provided with the NILC source code but it is The following libraries are also required:
possible to use a local version of the Healpix library. + *GSL*
+ *FFTW3*
The NILC tool also uses the *GSL* library. The *swig* program is used to interface c++ with python, together with the numpy
core headers (in particular numpy/arrayobject.h)
** Installing the NILC tool
*** Compiling Healpix ** Installing the spherelib python package
A recent version of the Healpix library is provided with the source =cd python=
under the =healpix= directory. =./waf configure --with_healpy=path/to/healpy=
Change to this directory and run:
=HEALPIX_TARGET=generic_gcc; make=
The Healpix compilation step will be included to the main construction
script in the near future.
*** Compiling the NILC binary
Change directory to root and run:
=./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= =./waf install=
Default prefix is '/usr/local'.
** Running the NILC tool
A simple test can be run using the simulated data provided with the
NILC package:
=cd nilc=
=./nilc fullsky.param=
* Using the C++ library
* 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:
[[file:./nilc/fullsky.param]]
** 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:
file:./nilc/patch.param
** 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:
file:./nilc/grid.param
* 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:
=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).
file:./nilc/needlet.param
* 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:
=nilc -p outfile -z zonefile N infile1 coeff1 ... infileN coeffN=
+ In the needlet case:
=nilc outfile l0 J zonefile1 lmax1 ... zonefileJ lmaxJ N infile1 coeff1 ... infileN coeffN=
#!/bin/bash #!/bin/bash
git archive --format=tar --output nilc.tar --prefix=nilc/ HEAD COPYING healpix include lib/src nilc ./org.css README.org waf wscript git archive --format=tar --output nilc.tar --prefix=nilc/ HEAD COPYING healpix include lib/src nilc ./org.css NILC_README.org waf wscript
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment