Furax Documentation#

Furax is a Framework for Unified and Robust data Analysis with JAX, providing building blocks for solving inverse problems in astrophysical and cosmological domains. It focuses on Cosmic Microwave Background (CMB) analysis with two main components:

  1. Linear Operators (furax.core): Composable linear algebra operators built on top of JAX and Lineax

  2. Stokes Parameters & Landscapes (furax.obs): Data structures for CMB polarization analysis

Key Features#

🚀 High Performance: Built on JAX for GPU acceleration and just-in-time compilation

🔧 Composable Operators: Mathematical operators that compose naturally with @ and +

🌌 CMB-Ready: Specialized data structures for polarization analysis and sky pixelization

🔬 Scientific Computing: Integration with HEALPix, AstroPy, and the broader scientific Python ecosystem

📊 Flexible Analysis: Support for component separation, mapmaking, and likelihood analysis

Getting Started#

Install Furax with:

pip install furax

Optional extras are available for additional features:

# Component separation (adds PySM3)
pip install furax[comp_sep]

# Mapmaking utilities
pip install furax[mapmaking]

# Instrument interfaces (SO, TOAST, LiteBIRD)
pip install furax[interfaces]

For development:

git clone https://github.com/CMBSciPol/furax.git
cd furax
pip install -e .[dev]

Quick Example#

import jax.numpy as jnp
import jax.random as jr
from furax import DiagonalOperator
from furax.obs.landscapes import HealpixLandscape

# Create a HEALPix landscape for polarization data
landscape = HealpixLandscape(nside=32, stokes='QU')

# Generate random Stokes parameters
stokes_data = landscape.normal(jr.key(42))

# Create a diagonal operator for weighting
weights = jnp.ones(landscape.size)
weight_op = DiagonalOperator(weights, in_structure=landscape.structure)

# Apply the operator
weighted_data = weight_op(stokes_data)

Table of Contents#

Indices and tables#