oliveirara / polyMV

Python package that converts multipolar coefficients into Multipole Vectors and Fréchet Vectors

Home Page:https://oliveirara.github.io/polyMV

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

polyMV

ascl:2007.009 GitHub license

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 DOI.

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:

  1. Download MPSolve from source (make sure you have all dependencies):

    git clone https://github.com/robol/MPSolve.git
  2. In MPSolve folder, run:

    bash autogen.sh
  3. Configure:

    ./configure --prefix=<path-to-installation-folder>
  4. Compile in parallel (it's faster):

    make -j 4

    In this case, the compilation will run in 4 threads.

  5. Install MPSolve:

    make install

polyMV part:

  1. Clone this repository:

    git clone https://github.com/oliveirara/polyMV.git
  2. Inside src folder, open mpsolve.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
  1. 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).

About

Python package that converts multipolar coefficients into Multipole Vectors and Fréchet Vectors

https://oliveirara.github.io/polyMV

License:GNU General Public License v3.0


Languages

Language:Python 55.1%Language:Jupyter Notebook 44.9%