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.
Metadata
Release files for foscat 2026.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| foscat-2026.6.1.tar.gz | 224.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| foscat-2026.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 468.7 kB
Release files / foscat-2026.6.1.tar.gz
| Download URL | foscat-2026.6.1.tar.gz |
|---|---|
| Size | 224.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d2518fca343143085a51acfd5176433ca07713ea0e9d5b80307cd696737131e
|
|
BLAKE2b-256 checksum How to use checksums |
336626a30f0c1327dc9419013a34c1af411040b1126b725556d78e14ea2f9a43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|
Release files / foscat-2026.6.1-py3-none-any.whl
| Download URL | foscat-2026.6.1-py3-none-any.whl |
|---|---|
| Size | 244.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3f32f4b7f4a481345f493e57d38acbc0a827df9fc510af95a7d03d5ea6093c3
|
|
BLAKE2b-256 checksum How to use checksums |
65cbaf68f5797e8bed885b5436bc1aa25236700930786ff5881298d7dcc1dbbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|