makewfs
makewfs turns a configured pupil-plane phase/OPD map into a realistic
adaptive-optics wavefront-sensor image. The supported sensors are
Shack–Hartmann and four-face pyramid sensors.
The package owns the wavefront-sensor optics. It deliberately reuses
pyturb for atmospheric OPD and
getframes for detector response and
noise; neither model will be reimplemented here.
Status: stable.
makewfs1.0 freezes the configuration-driven Shack–Hartmann and four-face pyramid API under Semantic Versioning. Broadband source morphology, wavelength-resolved detector QE, Shack–Hartmann sodium-layer elongation, and optional end-to-end CuPy execution are supported. The documented mean-altitude LGS OPD approximation remains intentionally distinct from future range-resolved turbulence.
The minimal API is:
import makewfs
wfs = makewfs.WavefrontSensor.from_toml("wfs.toml")
frame = wfs.expose(opd_m, seed=0) # getframes.Frame, data in ADU
Install the CPU package from PyPI with:
python -m pip install makewfs
For the optional CUDA 12.x path:
python -m pip install "makewfs[gpu]"
Set device = "gpu" under [numerics] and pass a CuPy OPD array for the
device-resident path. frame.data is then a CuPy ADU array; use
getframes.to_numpy(frame.data) only at an intentional host boundary.
The repository includes a runnable starter configuration at
examples/configs/shack_hartmann_minimal.toml.
The corresponding pyramid starter is at
examples/configs/pyramid_minimal.toml.
For an ideal photon-rate map, use wfs.photon_rate(opd_m); for one detector
exposure containing several temporal OPD samples, use
wfs.expose_integrated(samples).
For closed-loop work, construct the sensor once and call expose() with each
new residual wavefront. The only per-frame inputs are the wavefront and,
optionally, a detector-noise seed; telescope, source, sensor, sampling, and
camera choices live in the configuration.
CPU/GPU throughput
Warm end-to-end frame throughput on an AMD Ryzen 9 9950X3D and NVIDIA RTX 5090
includes optics, getframes detector noise, truth, and ADU, with device-resident
input/output and no host transfers:
| Workflow | Output | Work samples | CPU (frames/s) | GPU (frames/s) | Speedup |
|---|---|---|---|---|---|
| 20x20 SH, float32 | 160x160 | 1 | 143.4 | 2,011.2 | 14.03x |
| 60x60 SH, float64 | 360x360 | 1 | 26.3 | 945.2 | 35.94x |
| Broadband/range-sampled SH | 64x64 | 9 | 99.8 | 557.1 | 5.58x |
| Pyramid, 8-point modulation, float32 | 80x80 | 8 | 668.5 | 1,579.4 | 2.36x |
| Pyramid, 32-point modulation, float64 | 108x108 | 32 | 33.3 | 903.9 | 27.18x |
Higher is better. A tiny unmodulated 54x54 pyramid case remains CPU-faster (3,570 versus 1,541 frames/s) because GPU launch overhead dominates its small optical workload. See the full snapshot, raw JSON, and benchmark methodology.
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 makewfs-1.0.0.tar.gz.
File metadata
- Download URL: makewfs-1.0.0.tar.gz
- Upload date:
- Size: 408.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4225dae9c10d68025daef7cf9f418d80359b735651f610e05e6fac0c596d2c62
|
|
| MD5 |
1e8b276a236a0b5fad101c7d307dbf39
|
|
| BLAKE2b-256 |
60e0ad6a04cde4bc2847f5a9a6af4eca871aeedf7cf893dae73fe7c557969f73
|
Provenance
The following attestation bundles were made for makewfs-1.0.0.tar.gz:
Publisher:
release.yml on jacotay7/makewfs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
makewfs-1.0.0.tar.gz -
Subject digest:
4225dae9c10d68025daef7cf9f418d80359b735651f610e05e6fac0c596d2c62 - Sigstore transparency entry: 2256500088
- Sigstore integration time:
-
Permalink:
jacotay7/makewfs@9ecfc14fbb4f24f2bbd7c8666880d704ecc3fd5b -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/jacotay7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9ecfc14fbb4f24f2bbd7c8666880d704ecc3fd5b -
Trigger Event:
push
-
Statement type:
File details
Details for the file makewfs-1.0.0-py3-none-any.whl.
File metadata
- Download URL: makewfs-1.0.0-py3-none-any.whl
- Upload date:
- Size: 39.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
589bb012d8ae505884f0e8c2cd579bafbe2627d483a5f5c35bfee38b81c6b642
|
|
| MD5 |
ff2be7715fb789a76eb6fb835a0264ad
|
|
| BLAKE2b-256 |
3ee747d656dab51bc27722cea47af48d567752aef2b73654311ba2a7c775eff2
|
Provenance
The following attestation bundles were made for makewfs-1.0.0-py3-none-any.whl:
Publisher:
release.yml on jacotay7/makewfs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
makewfs-1.0.0-py3-none-any.whl -
Subject digest:
589bb012d8ae505884f0e8c2cd579bafbe2627d483a5f5c35bfee38b81c6b642 - Sigstore transparency entry: 2256500098
- Sigstore integration time:
-
Permalink:
jacotay7/makewfs@9ecfc14fbb4f24f2bbd7c8666880d704ecc3fd5b -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/jacotay7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9ecfc14fbb4f24f2bbd7c8666880d704ecc3fd5b -
Trigger Event:
push
-
Statement type: