Skip to main content

kalast

Kalast is a thermophysical model (TPM) for binary asteroids, used to simulate images as they would be seen from a spacecraft.

Shape models are made of triangular facets. The TPM is a forward finite difference solver of the heat conduction equation, with boundary conditions:

  1. at the surface, from solar radiation, mutual heating with a secondary body (thermal reflection and emission), and self-heating (with extra constraints for neighboring facets, e.g. shadowing/visibility);

  2. at depth, using either an adiabatic condition or an internal flux condition for larger bodies (e.g. the Moon).

The surface boundary condition only applies to airless bodies (asteroids, moons) without an atmosphere.

The image simulator renders shape models with a customizable observer frustrum (position/specs), to reproduce images taken from a spacecraft. It uses a custom wgpu + shader rendering pipeline. Images can be simulated in visible light (diffuse lighting shader) or infrared (using TPM surface temperature output and an infrared flux simulation — emission and reflection — based on a thermal camera’s specifications, e.g. its spectral response function).

Structure

  • kalast/: Python wrapper. Provides Pythonic usage of Kalast (e.g. object references) for users less familiar with Rust. Built with maturin.

  • src/: Rust core of the simulation. Written to be usable standalone by Rust users, independent of Python — the Python wrapper must not compromise its speed.

  • shaders/: wgpu shaders (.wgsl) used by the rendering pipeline.

  • examples/: Examples of usage of Kalast. Scripts under examples/old/ are earlier/superseded versions kept for reference, not maintained as user-facing examples.

  • res/: resources folder (if missing get it from cloud-as.oma.be).

  • out/: default output directory for simulation results.

Compilation

Create a virtual environment to install dependencies and compile code, I recommend astral uv for Python. Then, from within you venv, run the following.

Build the kalast rust dynamic library kalast/_rs.cpython-314-darwin.so (example for Mac).

maturin develop

Use --release for anything measured or run in earnest – debug is 2-15x slower, worst on the per-pixel frame-export loops (measured 22.6 -> 53.1 it/s at 3.1M facets with export on). Keep plain maturin develop while implementing a feature, and rebuild with --release once it works.

maturin develop --release

Beyond the default opt-level = 3 there is nothing worth adding: lto = "fat" + codegen-units = 1 was measured on this project and gave no improvement (render loop 52.7 vs 55.1 it/s, mesh load+flatten 1.07 vs 1.10 s, both inside run-to-run noise) while pushing the build from ~59 s to ~87 s. Recorded in Cargo.toml so it is not retried blindly.

Run a Python example.

python -i examples/two_spheres/main.py

Import kalast from Python and start writing your own scripts.

import kalast;

Release files for kalast 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kalast 0.5.0
File Size Uploaded
kalast-0.5.0.tar.gz 924.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for kalast 0.5.0
File
kalast-0.5.0-cp314-abi3-win_amd64.whl CPython 3.14 abi3 Windows x86-64 Details
kalast-0.5.0-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 abi3 Linux glibc 2.17+ x86-64 Details
kalast-0.5.0-cp314-abi3-macosx_11_0_arm64.whl CPython 3.14 abi3 macOS 11.0+ ARM64 Details
kalast-0.5.0-cp314-abi3-macosx_10_12_x86_64.whl CPython 3.14 abi3 macOS 10.12+ x86-64 Details

Total release size: 34.1 MB

Release files / kalast-0.5.0.tar.gz

Download URL kalast-0.5.0.tar.gz
Size 924.6 kB
Tags Source
SHA-256 checksum
How to use checksums
36d45eb61a28dc202dd4bac070edd8635f57649e58d2d65ecd7c39ec8f933b82
BLAKE2b-256 checksum
How to use checksums
62e8a0bcf7921c2387b896105324c69b8bbbd9b8722cef562a94947541a57cfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / kalast-0.5.0-cp314-abi3-win_amd64.whl

Download URL kalast-0.5.0-cp314-abi3-win_amd64.whl
Size 8.0 MB
Tags CPython 3.14 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f1a66079d0969f1c4428e80f5b93cfa86c5eddd064ddd52d63c45d2de4686182
BLAKE2b-256 checksum
How to use checksums
2cc077676cc814826456f9f1700bb41240ec4e373ac59e08becc9022fd6ff08f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / kalast-0.5.0-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL kalast-0.5.0-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 9.9 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
b3520c21a525623c6a22b07167b5e5f5637daf3586c1978f5b49a78e41be1138
BLAKE2b-256 checksum
How to use checksums
f038fca483aa63c194429efcc3bed56f18a9f6c8456eacc4fab5db076adca858
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / kalast-0.5.0-cp314-abi3-macosx_11_0_arm64.whl

Download URL kalast-0.5.0-cp314-abi3-macosx_11_0_arm64.whl
Size 7.4 MB
Tags CPython 3.14 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3ae08bed2ffd68a545622b15f859f00c8c5fd9f73c0759c43e7ece8ae2fe1465
BLAKE2b-256 checksum
How to use checksums
a168f8b2e24d58a58eb06b0c1a8bc151827437c090e6aee5a03d21db12b4dbbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / kalast-0.5.0-cp314-abi3-macosx_10_12_x86_64.whl

Download URL kalast-0.5.0-cp314-abi3-macosx_10_12_x86_64.whl
Size 7.8 MB
Tags CPython 3.14 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
01087c37e5a410058e82c504e1988d05879ede9b86eaac60cef5fc96e0aa645f
BLAKE2b-256 checksum
How to use checksums
bb55c3a5e019852ef23e221e4a57159e3a7d4732b328df7dd9437341ae35a378
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.9

5 release files

0.5.8

5 release files

0.5.7

5 release files

0.5.6

5 release files

0.5.5

5 release files

0.5.4

5 release files

0.5.3

5 release files

0.5.2

5 release files

0.5.1

5 release files

This release

0.5.0 This release

5 release 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