Generate synthetic Healpix or 2D data using Cross Scattering Transform
Project description
FOSCAT
FOSCAT is a Python package for wavelet/scattering-based analysis and synthesis of data on regular 2D grids and on the sphere with HEALPix pixelization.
This README replaces the former dependency on FOSCAT_DEMO. The recommended examples are now the notebooks from demo-foscat-pangeo-eosc, especially:
Demo_Synthesis.ipynb- global HEALPix synthesis from scattering-covariance statistics.Synthesis2D.ipynb- 2D image/field synthesis.Denoising-2D.ipynb- denoising by statistical constraints.Remove_CMB.ipynb- component separation / CMB-like background removal.local_foscat.ipynbandCNN_local.ipynb- local HEALPix domains and local spherical convolutions.
Install
pip install foscat
For the examples, a fuller environment is usually useful:
micromamba create -n foscat python=3.10
micromamba activate foscat
pip install foscat
pip install tensorflow torch healpy xarray gcsfs zarr jupyterlab
Minimal HEALPix synthesis sketch
import numpy as np
import foscat.scat_cov as sc
from foscat.Synthesis import Synthesis
nside = 64
target_map = np.random.randn(12 * nside**2)
scat_op = sc.funct(KERNELSZ=5, NORIENT=4, OSTEP=1, all_type='float64')
target_stat = scat_op.eval(target_map)
class MyLoss:
def __init__(self, scat_op, target_stat):
self.scat_op = scat_op
self.target_stat = target_stat
def eval(self, x, batch, return_all=False):
stat = self.scat_op.eval(x)
loss = stat.reduce_mean_batch((stat - self.target_stat) ** 2)
return loss
x0 = np.random.randn(target_map.size)
solver = Synthesis(MyLoss(scat_op, target_stat))
result = solver.run(x0, EVAL_FREQUENCY=10, NUM_EPOCHS=50)
Documentation
This repository contains a MkDocs documentation skeleton:
pip install mkdocs mkdocs-material
mkdocs serve
A minimal Sphinx bridge is also provided in docs_sphinx/ for teams preferring Sphinx.
Main sections
- Getting started: installation and concepts.
- User guide: scattering covariance, HEALPix synthesis, 2D synthesis, component separation, and local wavelet convolutions.
- Examples: mapping from maintained notebooks to documentation pages.
- Reference: practical API entry points and best practices.
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.4.1.tar.gz.
File metadata
- Download URL: foscat-2026.4.1.tar.gz
- Upload date:
- Size: 205.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d64f9161b6c157da07566064fc022d923b6ebbbe7fcc5fc4a3725c06bfb6ccf
|
|
| MD5 |
cabc544e87c7d92795a36a9cdc32aec2
|
|
| BLAKE2b-256 |
a07094a9e3dc1e597117cc9feac5776059169a12af490a0c43ab12629d42e613
|
File details
Details for the file foscat-2026.4.1-py3-none-any.whl.
File metadata
- Download URL: foscat-2026.4.1-py3-none-any.whl
- Upload date:
- Size: 225.5 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 |
4ac07a80c77af982356955a78fcebe38fbfde6029d5e64bb6177821cab414b15
|
|
| MD5 |
cb13700c79a86af806dc8f6d81b502d0
|
|
| BLAKE2b-256 |
d0ac757856c5f0bd493c674ae0d3ef3bbc4ea6fb50214f03f6817a2ca53d1848
|