The FLAG
code provides functionality to perform fast and exact Fourier-Laguerre and Fourier-Bessel transforms on the ball.
The primary C version of this code can be installed from source by running
git clone [email protected]:astro-informatics/src_flag.git
cd src_flag
mkdir build && cd build
cmake .. && make
Following which one can check the installation by running
ctest
within the build directory.
FLAG
can easily be installed from PyPi by running
pip install pyflag
pip list
or alternatively from source by first compiling the C code and running
pip install .
from the root directory, following which the package may be tested by running
pytest
within the root directory.
Mex wrappers are available, however they are currently being sunsetted, so installing previously tagged versions is advised.
First install FLAG
for python, then you can call it from any python script to perform forward and inverse flag transforms and their adjoints by
import pyflag as flag
import numpy as np
L = 10 # Angular bandlimit
P = 5 # Radial bandlimit
tau = 1 # Laguerre scaling factor
spin = 0 # Spin of signal
reality = 0 # Real or complex signals
# Create a random complex signal (c indexing)
f = np.random.rand(P, L, 2*L-1) + 1j*np.random.rand(P, L, 2*L-1)
f = f.flatten('C')
# Compute e.g. the Forward transform
flmp = flag.flag_analysis(f, L, tau, P, spin, reality)
B. Leistedt, J. D. McEwen, and M. A. Price
@article{price:2021:bayesian, author = {Matthew~A.~Price and Jason~D.~McEwen}, title = {Bayesian variational regularization on the ball}, journal = {ArXiv}, eprint = {arXiv:2105.05518}, year = 2021 }
@article{leistedt:2012:exact, author = {Boris~Leistedt and Jason~D.~McEwen}, title = {Exact Wavelets on the Ball}, journal = {IEEE Trans. Sig. Proc.}, year = 2012, volume = {60}, number = {12}, pages = {6257-6269}, doi = {10.1109/TSP.2012.2215030}, }
@article{McEwen:2011:novel, author = {Jason~D.~McEwen and Yves~Wiaux}, title = {A novel sampling theorem on the sphere}, journal = {IEEE Trans. Sig. Proc.}, year = 2011, volume = {59}, number = {12}, pages = {5876-5887}, doi = {10.1109/TSP.2011.2166394}, }
FLAG package to perform fast wavelet transform on the sphere<br> Copyright (C) 2021 Boris Leistedt & Jason McEwen & Matthew Price This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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. See the GNU General Public License for more details (LICENSE.txt). You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.