polyMV
polyMV
is a Python package that converts multipolar coefficients (alms
in healpix
order) into Multipole Vectors (MVs) and also Fréchet Vectors (FVs) given a specific multipole.
Any publications making use of polyMV
should cite this paper: R. A. Oliveira, T. S. Pereira, and M. Quartin, CMB statistical isotropy confirmation at all scales using multipole vectors, Phys. Dark Univ. 30 (2020) 100608 (arXiv:1812.02654 [astro-ph.CO]).
Checkout MVs and FVs from Planck 2015 and 2018 temperature maps in .
Instalation
polyMV
uses MPSolve
. MPSolve is a C package that finds roots of polynomials with high speed and precision. Before installing polyMV
, compile and install MPSolve
:
MPSolve part:
-
Download
MPSolve
from source (make sure you have all dependencies):git clone https://github.com/robol/MPSolve.git
-
In
MPSolve
folder, run:bash autogen.sh
-
Configure:
./configure --prefix=<path-to-installation-folder>
-
Compile in parallel (it’s faster):
make -j 4
In this case, the compilation will run in 4 threads.
-
Install
MPSolve
:make install
polyMV part:
-
Clone this repository:
git clone https://github.com/oliveirara/polyMV.git
-
Inside
src
folder, openmpsolve.py
and replace the path for “libmps.so.3” on line 7:- on macOS:
_mps = ctypes.CDLL("libmps.so.3") -> _mps = ctypes.CDLL("<path-to-installation-folder>/MPSolve/lib/libmps.3.dylib")
- on Linux:
_mps = ctypes.CDLL("libmps.so.3") -> _mps = ctypes.CDLL("<path-to-installation-folder>/MPSolve/lib/libmps.so.3")
polyMV
is implemented to obtain fast roots of polynomials with precision up to 8 digits (about 0.02” on multipole scales). If you need more precision you should change in mpsolve.py
file:
- Line 88:
_mps.mps_context_set_output_prec(self._c_ctx, ctypes.c_long(53)) -> _mps.mps_context_set_output_prec(self._c_ctx, ctypes.c_long(XX))
where XX is the number of bits, not decimals.
- Line 89:
Goal.MPS_OUTPUT_GOAL_ISOLATE -> Goal.MPS_OUTPUT_GOAL_APPROXIMATE
-
Install:
pip install .
You also can add the flag --user
to install locally.
Notebooks:
In notebooks
folder you will find some examples of how to use polyMV
.
This work was funded by Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq), Coordenação de Aperfeiçoamento de Pessoal de Nível Superior (CAPES) and Fundação Araucária (PBA-2016).