Skip to main content

Foton

Hardware-adaptive, backend-neutral daylight analysis engine for progressive daylight coefficients, daylight factor, daylight autonomy, and static sDA.

PyPI - Version License Platform

Install

The product and import name is Foton. The PyPI distribution is foton-daylight. You can install it using pip:

python -m pip install foton-daylight
from foton import Engine

engine = Engine()
print(engine.capabilities())

See installation, backend requirements, Python API, and benchmarking.

Implemented

  • Typed Rust scene contracts for instanced triangle meshes, materials, and sensors.
  • Canonical Tregenza 146 and Reinhart MF:2 578 sky mapping including ground.
  • Exact MF:2-to-Tregenza parent aggregation and deterministic sample keys.
  • Lambertian transport and Radiance-compatible visible-transmittance conversion with angular thin-glass interface effects.
  • Streamed annual metrics with explicit weighted occupancy schedules.
  • Native Metal BLAS/TLAS construction, direct ray-query visibility, and tiled GPU annual reduction through runtime-compiled MSL.
  • Vulkan 1.3 BLAS/TLAS construction and SPIR-V ray-query compute pipelines for NVIDIA, AMD, and Intel GPUs on Linux and Windows.
  • Resident scene handles that reuse acceleration structures across analyses and revisioned instance updates.
  • Async PyO3 jobs with cancellation, supersession, copied NumPy ownership, snapshots, GIL release while waiting, and opt-in coefficient export.
  • Canonical shoebox and generated 1,000-room/25,000-sensor fixtures.

Direct visibility, multi-bounce diffuse and thin-glass transport, and annual metric reduction execute on Metal or Vulkan. The deterministic CPU backend and Radiance remain validation oracles.

Development

cargo test -p daylight-core -p daylight-metal -p daylight-vulkan -p daylight-cli
cargo check -p daylight-python --features extension-module
cargo run -p daylight-cli -- hardware
cargo run -p daylight-cli -- fixture --output tests/fixtures/shoebox.json
python -m unittest discover -s validation

Build the Python extension from source:

python -m pip install -e .

Compare a Honeybee shaded shoebox against native Radiance direct visibility:

python scripts/compare_honeybee_shoebox.py --auto-grid

Hardware Benchmarks

Run the reproducible Honeybee/Radiance benchmark after installing the Honeybee extra and making Radiance oconv and rcontrib available on PATH (or set RADIANCE_BIN). Bundled OpenStudio installations under /Applications are detected automatically:

python -m pip install -e '.[honeybee]'
python scripts/benchmark_hardware.py --backend auto --append-readme

Each run writes a self-contained folder under benchmarks/results/ with command logs, benchmark.json, and benchmark.md. It executes four versioned stages:

Stage Fixture Validation
Direct visibility Honeybee shaded shoebox, aperture, overhang, fins, 216 sensors Binary patch-center ray mismatches and weighted visible energy against Radiance
Full transport Same room with 0.6 visible-transmittance glass and diffuse bounces Coefficient NMBE and CV(RMSE) against rcontrib
Annual metrics Both coefficient matrices multiplied by the same deterministic 8,760-hour Tregenza sky and 08:00–18:00 schedule Occupied illuminance NMBE/CV(RMSE), DA, area-weighted sDA, and GPU/CPU reduction agreement
Large scene One resident shoebox mesh instanced into 1,000 rooms with 25,000 sensors Cold and cached scene, tracing, annual-reduction, and wall-clock timings

Use --quick for a 256-sample, one-bounce smoke benchmark. Use an explicit --backend metal or --backend vulkan to require that device; the run fails rather than silently benchmarking the CPU reference. --append-readme adds one hardware row and five fixture rows below, while the JSON report remains the detailed artifact.

Hardware

Run Date (UTC) Host OS Model CPU Cores RAM GPU Backend Engine
20260731T054146Z-CM-GHHXPN239T 2026-07-31 05:42:00Z CM-GHHXPN239T macOS 26.5.2 MacBook Pro Apple M4 Pro 14 24 GB Apple M4 Pro metal 0.1.0

Results

Run Fixture Scale Samples / bounces Accuracy vs Radiance Scene / AS Trace Annual Wall Radiance
20260731T054146Z-CM-GHHXPN239T Honeybee direct visibility 216 sensors × 146 patches 0 / 0 13 mismatches; 2.477% energy 0.00 ms 0.17 ms 0.06 ms n/a 66.27 ms
20260731T054146Z-CM-GHHXPN239T Diffuse + thin glass coefficients 216 sensors × 146 patches 4096 / 2 NMBE 5.295%; CV(RMSE) 344.379% 0.00 ms 5.79 ms 7.81 ms 30.95 ms 3574.31 ms
20260731T054146Z-CM-GHHXPN239T Annual illuminance + DA/sDA 216 sensors × 8760 hours 4096 / 2 NMBE 5.193%; CV(RMSE) 26.955%; sDA Δ 0.00 pp 0.00 ms 5.79 ms 7.81 ms 30.95 ms 3583.38 ms
20260731T054146Z-CM-GHHXPN239T 1,000-room resident scene 1000 rooms / 25000 sensors 64 / 1 performance fixture 5.00 ms 18.28 ms 2.10 ms 63.86 ms 4621.42 ms
20260731T054146Z-CM-GHHXPN239T 1,000-room resident scene (cached) 1000 rooms / 25000 sensors 64 / 1 resident BLAS/TLAS reuse 0.00 ms 4.24 ms 2.10 ms 39.17 ms 4431.31 ms

Local Three.js viewer

Install the native extension and local viewer dependencies:

python -m pip install -e '.[viewer]'
cd viewer && npm install

Run the Python service and Vite frontend together:

cd viewer && npm run dev

Open http://127.0.0.1:5173, upload an hourly EPW, and edit the parametric shoebox. The viewer runs a 64-sample Tregenza preview during interaction and a 4,096-sample Reinhart MF:2 refinement after the controls are idle. Radiance gendaymtx must be on PATH or under RADIANCE_BIN; daylight transport remains native Metal or Vulkan, selected from the GPU vendor.

For a single-process local build:

cd viewer && npm run build
foton-viewer

Release maintainers should also read the release process.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foton_daylight-0.2.0.tar.gz (132.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

foton_daylight-0.2.0-cp313-cp313-win_amd64.whl (446.9 kB view details)

Uploaded CPython 3.13Windows x86-64

foton_daylight-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (587.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

foton_daylight-0.2.0-cp313-cp313-macosx_11_0_x86_64.whl (594.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

foton_daylight-0.2.0-cp313-cp313-macosx_11_0_arm64.whl (584.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

foton_daylight-0.2.0-cp312-cp312-win_amd64.whl (447.3 kB view details)

Uploaded CPython 3.12Windows x86-64

foton_daylight-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (588.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

foton_daylight-0.2.0-cp312-cp312-macosx_11_0_x86_64.whl (594.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

foton_daylight-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (584.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

foton_daylight-0.2.0-cp311-cp311-win_amd64.whl (450.0 kB view details)

Uploaded CPython 3.11Windows x86-64

foton_daylight-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (588.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

foton_daylight-0.2.0-cp311-cp311-macosx_11_0_x86_64.whl (597.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

foton_daylight-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (589.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

foton_daylight-0.2.0-cp310-cp310-win_amd64.whl (449.9 kB view details)

Uploaded CPython 3.10Windows x86-64

foton_daylight-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (588.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

foton_daylight-0.2.0-cp310-cp310-macosx_11_0_x86_64.whl (597.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

foton_daylight-0.2.0-cp310-cp310-macosx_11_0_arm64.whl (589.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file foton_daylight-0.2.0.tar.gz.

File metadata

  • Download URL: foton_daylight-0.2.0.tar.gz
  • Upload date:
  • Size: 132.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for foton_daylight-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5ac244a271c24a2e81d7e186bce2624b0e5c5a5faeb00fc7e859fa5136fd5d74
MD5 a323f4fb2076a718a01d8d5d14565468
BLAKE2b-256 48acc4b5fc2ca1e5449e8bdb0357eeaff6a1531cee5d8ed78ddd6d777517cb23

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0.tar.gz:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d60e7b716751ef6a0e3283f8f275d532b3faeeb1870b59a0d66dfcedce5a0694
MD5 a100d1a6d7c653236029d22a7a4eaf25
BLAKE2b-256 bc1b55e817e3dd70eb0be4b20746ef1269fad415fc4998f8176cf6894e7c7810

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp313-cp313-win_amd64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b942d114f966fcad30c3cf1bd2784e751f19e8aa71d09904de22e1a42d76c4c
MD5 7bc611368c54862b0520a2d9e31fa8a5
BLAKE2b-256 37dc25d1e9b60d3d806a4107db9c040820457c684d5d0037fc52ba7a661cc045

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp313-cp313-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 b56d99ad8bf52657b68028fdce8aa5c39ddd901b05b5cbe68a38bde4caba1787
MD5 4bf929cfce1150a4d6da047a5e562cb7
BLAKE2b-256 1d36c05f7c6ba43229adf9fdd9248adb218ef7d1a0bda6df25d6ec4ca3ed5c6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp313-cp313-macosx_11_0_x86_64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8d179633713065cd0120e5ebad47271b9979bc90fc7427bb77d0026ec33a52f6
MD5 9054f847b7b95d3a70a1af7a84962155
BLAKE2b-256 b5822cac5a055feaf303ffe529a432432904af62ef894faffcb0059863f82e64

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9270028bc4d2b4a1563a6899bef60674e474a175a907640672cae928a0241c39
MD5 4193557ba58f18a4052fd7136f01359d
BLAKE2b-256 5f404e60c238145a204241def0fb2394757dbb91705236f92503e56ef58c57c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp312-cp312-win_amd64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6399875113e5448de62f8fbf41781c4e6c51d8f700343aa4b6192fc0dbf12e89
MD5 e413fd711090949956e0261bcb88153c
BLAKE2b-256 f7b79ed1467fb63d5cf9323920fa408da0f1c4223df91c46eeec5af145d3ac0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 b70155568fbc1cc73d64244b7f442edd2728ed1b0d9d867b5d9a8f3d7485aa28
MD5 0897ba7a4b81532cc2f259c5957aed08
BLAKE2b-256 fc049a7315535013aad8da21bd548e265b2428ce998758384c360304bd962f37

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp312-cp312-macosx_11_0_x86_64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7e52fdcafd895009a078880a64b9d325f5f9a6ac86e1780e71ee9ca44483c4c0
MD5 535ee3b46885119b136f941339442971
BLAKE2b-256 8bda7b076d6c4590ff36b73b23343bcdc427009662b7eb125885346cd3f307db

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e2deeeab4b43a54033f6f2532fba4b01e4fc2e631904240ff3c922cf2902732d
MD5 51fd10b5f34c8e13168503c7ba5cac41
BLAKE2b-256 a29e3a41d8a92c1ead903961aab99d080f50e9d287f3e56c3ebb84afbfb49df0

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp311-cp311-win_amd64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e027be35ba35b42f46ecd7676f75ff9e1d57ce41b21fe4bf17a7b1c3327fa95
MD5 efe7d86f32e907f7ae6b512b32e76ed5
BLAKE2b-256 63a0125ddd87e0b77b547cfb74a5cf26d7ebbcc4cdee86930519ad7b4abe218a

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 79e548926ea442c587596a677627b45bae4eee5376f68de6849897fe70505a23
MD5 35b77738c7cbd618d0fc8511199116d9
BLAKE2b-256 1d939b4c7519bd5c3e91bff88c6470fe663fd77ffd3fed76a5be60bc39b3894f

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp311-cp311-macosx_11_0_x86_64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4d6db7facf91c747b6eaf62a2d8b0764f51d96918f3db57fbb17826b59228df5
MD5 76d4ba1c539f40b31095132ebf1be7f2
BLAKE2b-256 cbc2591c25057d796412fd61380dcd9f22e3aab4c865ffd674041ac7875bb92b

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 00b7cbd3be83adf70ae8c4c3fc31daaf2aee1d2823e39765bc0cb173d8ab965b
MD5 fb706beb6b2cbca2c19f23f2655b743a
BLAKE2b-256 2b4f418f8158e4c70c36d08d3e6b3ffdf4bd1876f50424f0d019675154fcbb32

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp310-cp310-win_amd64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa283e91c2f4fe39de5f2e8dc0e5a95ee77450f37f5801a2164e6d5d5cdc1e84
MD5 03f12f6ce5720c3535688f2788a688da
BLAKE2b-256 8b2f67f7039d97a239b980528422bfe7d528e287d9380bac7a90a414145474c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 654fc0372b3d90c279f55fa85c87dfa78ad1d5312f6e1d04bd445e038c747c1d
MD5 92d815f490e5ea406939e2e5ebb3d4ee
BLAKE2b-256 383748b97367ebc069a94ae95fafcabd8945e1a9606a8dd031e29d15814b192b

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp310-cp310-macosx_11_0_x86_64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foton_daylight-0.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bb62b6aa7c52e51550e8909b84ac21aa62784c8d4e3084704a9629dd7c4845db
MD5 ffb88e9fb6b05fe596f227e9188890b5
BLAKE2b-256 ccaa093bcc194a8604e3265975c0e6f8973dd96a024d5aa94870c916d00909a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.2.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on snjsomnath/foton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

17 files

0.1.0

17 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page