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).

Getting it

Three ways in, and only the third needs anything installed.

A release. https://github.com/GregoireHENRY/kalast/releases — one archive per platform. Unpack it and run it from inside the folder:

./kalast                                   # the editor
./kalast examples/two_spheres/main.py      # a Python example
./kalast examples/crater_self_shadow/step.rs   # a Rust one
./kalast some/shape.obj                    # a mesh

There is nothing to install and nothing is written outside the folder. The archive carries its own Python, with kalast and its dependencies already in it, and the .rs examples come compiled. Editing one, or opening a .rs of your own, means compiling it: if the machine has no cargo the editor fetches a minimal toolchain into toolchain/ beside the executable and reuses it afterwards. On macOS that also wants Apple’s command line tools for the linker (xcode-select --install).

The package, to use kalast from your own environment:

pip install kalast          # Python
cargo add kalast            # Rust

A clone, to work on kalast itself — that is what Compilation below is about. If you are reading this inside an unpacked release, it is not for you.

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.2

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.2
File Size Uploaded
kalast-0.5.2.tar.gz 933.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for kalast 0.5.2
File
kalast-0.5.2-cp314-abi3-win_amd64.whl CPython 3.14 abi3 Windows x86-64 Details
kalast-0.5.2-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.2-cp314-abi3-macosx_11_0_arm64.whl CPython 3.14 abi3 macOS 11.0+ ARM64 Details
kalast-0.5.2-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.2.tar.gz

Download URL kalast-0.5.2.tar.gz
Size 933.9 kB
Tags Source
SHA-256 checksum
How to use checksums
744cc73cecade10e9f0c6b512d05755b8125203d94dbedae97be1a89a374df8b
BLAKE2b-256 checksum
How to use checksums
7796a2689d4b0187d9662d97c6f40aee52162c9b2700a012625b364187173e07
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 21, 2026.

Transparency log

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

Download URL kalast-0.5.2-cp314-abi3-win_amd64.whl
Size 8.0 MB
Tags CPython 3.14 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
724bbe555ef9d07a6ab92ebb8d2d0eceda446594a81802851eded0f86bb16b68
BLAKE2b-256 checksum
How to use checksums
8186cae489dc12685d3c3f31964c16424e9ef3be2376f9d1b962a20799da3e02
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 21, 2026.

Transparency log

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

Download URL kalast-0.5.2-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 10.0 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
49bc1ad5c30af84e8c60043a163bbad5259020b1fc3aa75ba0afe07c66e74f62
BLAKE2b-256 checksum
How to use checksums
681451db756718c0305e1d785717c693886b9457700b13962cdb8da7370c5a1c
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 21, 2026.

Transparency log

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

Download URL kalast-0.5.2-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
f0c78d1656fdfff10bd2c8130595af380e97293bec3359b8bb581a2ca447e696
BLAKE2b-256 checksum
How to use checksums
da23ca644fe5ee05bb6f5d2620fba3f5d734f1575064faf9fc8d18f1a06af4f1
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 21, 2026.

Transparency log

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

Download URL kalast-0.5.2-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
effe956574a2df331dbd16d2e534651a5e18c4dfc498c2c6b8b6a480d332554a
BLAKE2b-256 checksum
How to use checksums
e140281cfb6a868e0bace3723690d80a10eb786c54f4d6662c5dd611a49e5a0c
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 21, 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

This release

0.5.2 This release

5 release files

0.5.1

5 release files

0.5.0

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