Skip to content

PyLops/curvelops

Repository files navigation

Documentation Slack Status

curvelops

Python wrapper for CurveLab's 2D and 3D curvelet transforms. It uses the PyLops design framework to provide the forward and inverse curvelet transforms as matrix-free linear operations. If you are still confused, check out some examples below or the PyLops website!

Installation

Installing curvelops requires the following external components:

Both of these packages must be installed manually. See more information in the Documentation. After these are installed, you may install curvelops with:

export FFTW=/path/to/fftw-2.1.5
export FDCT=/path/to/CurveLab-2.1.3
python3 -m pip install git+https://github.com/PyLops/curvelops@0.23

as long as you are using a pip>=10.0. To check, run python3 -m pip --version.

Getting Started

For a 2D transform, you can get started with:

import numpy as np
import curvelops as cl

x = np.random.randn(100, 50)
FDCT = cl.FDCT2D(dims=x.shape)
c = FDCT @ x
xinv = FDCT.H @ c
np.testing.assert_allclose(x, xinv)

An excellent place to see how to use the library is the Gallery. You can also find more examples in the notebooks/ folder.

Demo Reconstruction

Useful links

Note

This package contains no CurveLab code apart from function calls. It is provided to simplify the use of CurveLab in a Python environment. Please ensure you own a CurveLab license as per required by the authors. See the CurveLab website for more information. All CurveLab rights are reserved to Emmanuel Candes, Laurent Demanet, David Donoho and Lexing Ying.