Generate synthetic Healpix or 2D data using Cross Scattering Transform
Project description
FOSCAT
FOSCAT (Field cOmpression via Scattering CovariAnce Transform) is a Python library for wavelet/scattering-based statistical analysis, synthesis, denoising, and deep learning on 2D fields and on the sphere with HEALPix pixelisation.
The central idea: any spatial field can be summarised by a compact vector of scattering-covariance statistics Φ(d) — encoding multi-scale, cross-orientation correlations beyond what a power spectrum captures. FOSCAT can then synthesise a new field matching those statistics, use them as a loss for denoising or component separation, or feed them into neural-network architectures that operate directly on spherical geometry.
Install
pip install foscat
Full environment for running the example notebooks:
micromamba create -n foscat python=3.10
micromamba activate foscat
pip install foscat torch healpy xarray gcsfs zarr jupyterlab matplotlib scipy
Backend note: FOSCAT uses PyTorch as its only active backend (TensorFlow and NumPy backends are no longer maintained).
Minimal HEALPix synthesis
import numpy as np
import foscat.scat_cov as sc
from foscat.Synthesis import Loss, Synthesis
nside = 64
target_map = np.random.randn(12 * nside**2)
# build the scattering operator and compute target statistics
scat_op = sc.funct(KERNELSZ=5, NORIENT=4, nstep_max=4, all_type='float64')
target_stat = scat_op.eval(target_map)
# define a differentiable loss
def synth_loss(x, scat_op, args):
ref = args[0]
stat = scat_op.eval(x)
return stat.reduce_mean_batch((stat - ref) ** 2)
loss = Loss(synth_loss, scat_op, target_stat)
solver = Synthesis([loss], eta=0.03)
x0 = np.random.randn(12 * nside**2)
result = solver.run(x0, NUM_EPOCHS=300, EVAL_FREQUENCY=10)
What FOSCAT can do
| Capability | Entry point | Example notebook |
|---|---|---|
| HEALPix synthesis | foscat.scat_cov.funct + Synthesis |
Demo_Synthesis.ipynb |
| 2D image synthesis | foscat.scat_cov2D.funct + Synthesis |
Synthesis2D.ipynb |
| Denoising | two-loss synthesis (statistics + fidelity) | Denoising-2D.ipynb |
| Component separation | multi-loss synthesis | Remove_CMB.ipynb |
| Local spherical analysis | cell_ids in FoCUS / HealpixUNet |
local_foscat.ipynb |
| Spherical U-Net (regression/segmentation) | HealpixUNet |
CNN_local.ipynb, CNN_ecmwf.ipynb |
Example notebooks are maintained in demo-foscat-pangeo-eosc.
Documentation
Full documentation (installation, mathematical background, API reference, user guide) is published at:
https://jmdelouis.github.io/FOSCAT/
To build the docs locally:
cd docs_sphinx
make install # pip install requirements.txt
make html # → _build/html/index.html
make livehtml # live-reload on save (requires sphinx-autobuild)
Citation
If you use FOSCAT in a publication, please cite:
@software{foscat,
author = {Delouis, Jean-Marc and Foulquier, Theo},
title = {{FOSCAT}: Field cOmpression via Scattering CovariAnce Transform},
year = {2026},
url = {https://github.com/jmdelouis/FOSCAT},
version = {2026.04.1},
}
The underlying statistical framework is described in:
- Allys et al. (2019), Rwst, a comprehensive statistical description of the non-Gaussian structures in the ISM, A&A 629, A115.
- Allys et al. (2020), New interpretable statistics for large-scale structure analysis and generation, Phys. Rev. D 102, 103506.
License
BSD 3-Clause. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file foscat-2026.6.1.tar.gz.
File metadata
- Download URL: foscat-2026.6.1.tar.gz
- Upload date:
- Size: 224.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d2518fca343143085a51acfd5176433ca07713ea0e9d5b80307cd696737131e
|
|
| MD5 |
86b88cfa5de958448edbb39329bd268c
|
|
| BLAKE2b-256 |
336626a30f0c1327dc9419013a34c1af411040b1126b725556d78e14ea2f9a43
|
File details
Details for the file foscat-2026.6.1-py3-none-any.whl.
File metadata
- Download URL: foscat-2026.6.1-py3-none-any.whl
- Upload date:
- Size: 244.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3f32f4b7f4a481345f493e57d38acbc0a827df9fc510af95a7d03d5ea6093c3
|
|
| MD5 |
b0f902aa5f67703f76f8721188d3d5b2
|
|
| BLAKE2b-256 |
65cbaf68f5797e8bed885b5436bc1aa25236700930786ff5881298d7dcc1dbbc
|