Skip to main content

Foton

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

Install

The product and import name is Foton. The PyPI distribution is foton-daylight because the shorter foton project name is owned by another publisher.

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.1.0.tar.gz (88.2 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.1.0-cp313-cp313-win_amd64.whl (396.1 kB view details)

Uploaded CPython 3.13Windows x86-64

foton_daylight-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (537.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

foton_daylight-0.1.0-cp313-cp313-macosx_11_0_x86_64.whl (536.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

foton_daylight-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (527.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

foton_daylight-0.1.0-cp312-cp312-win_amd64.whl (396.5 kB view details)

Uploaded CPython 3.12Windows x86-64

foton_daylight-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (538.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

foton_daylight-0.1.0-cp312-cp312-macosx_11_0_x86_64.whl (536.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

foton_daylight-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (527.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

foton_daylight-0.1.0-cp311-cp311-win_amd64.whl (399.3 kB view details)

Uploaded CPython 3.11Windows x86-64

foton_daylight-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (538.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

foton_daylight-0.1.0-cp311-cp311-macosx_11_0_x86_64.whl (539.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

foton_daylight-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (532.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

foton_daylight-0.1.0-cp310-cp310-win_amd64.whl (399.2 kB view details)

Uploaded CPython 3.10Windows x86-64

foton_daylight-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (538.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

foton_daylight-0.1.0-cp310-cp310-macosx_11_0_x86_64.whl (538.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

foton_daylight-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (532.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: foton_daylight-0.1.0.tar.gz
  • Upload date:
  • Size: 88.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 0b98c388492d4d13425395e03bc44c3044b4ce1c83249b42c9ce941e033b8ca6
MD5 c52bd9ea75e3fb059aa65317d640c849
BLAKE2b-256 b66bb71c691b22b1849520acf306dd0ad1fb13d47556fa3dac273b58d2757d33

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 59510fda9960b324084370b06dfb03d0a7b481ca8b1a826c522c44877d34ef04
MD5 48a14f1d39bb5440f150e946834222a6
BLAKE2b-256 edaf872663b62c4a847b6349a0300c7482fe4b33ea7a67a3226eb183b36fd33d

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 94fda0051cbb1ba8fa971eb5a60a399697e26dd998eb7f2a2d3a7ad17baf9ee5
MD5 3ba5a1aa0988c94ac3a13ecc1cbfb771
BLAKE2b-256 3f2f25ba64f4f1cc42edab9a567644b8577e67fc8d2d5daaec0d0d9b2399d939

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp313-cp313-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 98575ffbe55e95a5a787027d89eea06d1f0aadee8e91e2ac184f75b564dad778
MD5 461870e66803601b376b250b72edfe1f
BLAKE2b-256 f7f41681dea80a49c33fcd6fd462ffd7b924c1a1a547d580f8582216bf819f0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa728dadc4c6e72393d1d0c3b862d09b8d8e8a233d81035a6ef373a641be2ec8
MD5 c73dd8be15f49c403cb5ca3a1519c34b
BLAKE2b-256 0fba2b5d8e7ec51e0aacd2c15799dffbe00b465af3668d489d9729f4ed267ef3

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 eb28a375f1a494abaef808261a37b8755cf98c2e09de06203eca3517124e8b01
MD5 f0168a1906ad8ed44fa5be78eb029672
BLAKE2b-256 c67f322d53399601249025bdeba8e4b7e89ed19487d41fbac245ce272ba0cdd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f90782e8bbb86667550f65baece265c388386fd0bffd41e4673d3ec7529a4ff
MD5 6859c2f1be789f9b27fd40d42e563b94
BLAKE2b-256 088430c796d4ced0b80ea7672097b09d7a06e2f7450bd2e7a88a3e81d1f81737

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 9541e91aad4551d1aec73dafad01ca0671aef774105bad627c07ef1206a64fd2
MD5 81234b6f214e34f43f3d94fbe39c3d8d
BLAKE2b-256 8f46252cf7518849a5a610f3ee966a948a479d6e4a9abd50a243756ea5d74c21

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0b63aebd51eed4e9e142e1be5b831c2c455758360257b989cc91acbb1c6c4399
MD5 018f90c5b77dc26ee079c0425e34229e
BLAKE2b-256 e55c82813dd3e7a7aaf8616eedeab9dcfa4e0f5916e5eb9d1e5ecd971d897b29

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b55d62f807e2516bd80d4d9e4838c23dcc4456624768df51aa249b9ff916fbb3
MD5 6fd20124a1f527d584537d7e80c4a662
BLAKE2b-256 dec6f51c7ed63441e0394ce118d54905d1ce956577c25227c74bab344c0ea2b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 67f4edce3c0ab9e87e0a054f5cabba79686b36d320de178fc781a83bf00e61c1
MD5 dfac7650ba83e85caeb45ea5448403a1
BLAKE2b-256 07348ca654d42c5bc64c0642a53f34947e81766ab4c295c1b1961302fd89ae0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 3bd826bbaa9c00d5187ab03be771fc12174517c14b972b2a0d5dd8cdb4dd4e95
MD5 525e252b96520e6283d398701c6acf14
BLAKE2b-256 3be272143ebd6009b044f28e6d968f5ce21abc0e7cb394265b7d4ede0f5a7bd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cdbdfba72e97769fd1b4eb7477a8b4de6c6a3a0b8f0e5315e106fa9ff22806ed
MD5 97b22b97162557ec3dcb7abfa5b3108d
BLAKE2b-256 aaae20afcd4a2f0bc7486789db28598cc38ef1c83ba24c32e339db1aa4fdd528

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d1404c34cba9c195e168ccdc9d2caf1494730526c822cb7eef89c66252f23099
MD5 b22ee02f71db8c59f395f7b288bc59d7
BLAKE2b-256 c839c4354157197a9fc0dc5858993f3cbaf2a5f824f602c01a63a5c7b3cd1877

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6c46f9d327d2139df1fd24d0a705669d876afeb9083d3e9f75f648608930815
MD5 080e21158b7a13c080adcb22e5717e3c
BLAKE2b-256 c5a191bd1b4d5a8174becf0ac5b5a78c45f53514aeaf2401339ff9b53f0705ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 bf780647e482bb22af22c322b07d3daa50aa2895ce2907cdb2bd0e7adfe4100e
MD5 3a948fb35280ee9342201bdc7c192aa1
BLAKE2b-256 b1ffe9c8b1e95b6fd16e1a9050bb1e77f896cde9d532f0bfdcc035714fc5d8b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for foton_daylight-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 18c652c717a20c2ce279cefdc64f86cc2cadcb06e23aedad274c52526d145abf
MD5 e2dbc81a0c6ab58c3ad894ff8786b071
BLAKE2b-256 26a1388081a748cb7830ef991a97b510c6f25ca94ebe627ea5d71402b14f3295

See more details on using hashes here.

Provenance

The following attestation bundles were made for foton_daylight-0.1.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

0.2.0

17 files

This release

0.1.0 This release

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