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

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.1
File Size Uploaded
kalast-0.5.1.tar.gz 931.8 kB Details

Built distributions (wheels)

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

Total release size: 34.2 MB

Release files / kalast-0.5.1.tar.gz

Download URL kalast-0.5.1.tar.gz
Size 931.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cd630a674fed6e82b39d18397e4a0f6af163c4d2aa880d646578084406075b60
BLAKE2b-256 checksum
How to use checksums
29018e904f4a47f21fa64e5ca3a621cf7b885fe6d067510ea8adea72bfd90507
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.1-cp314-abi3-win_amd64.whl

Download URL kalast-0.5.1-cp314-abi3-win_amd64.whl
Size 8.1 MB
Tags CPython 3.14 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
b7834f9e0e638c0cea9680c9081d611f5cdd30bf8fa04f59386a73a5e0de6087
BLAKE2b-256 checksum
How to use checksums
c3c62886d4d49f510ebfabc94ee3d20bba78f1ae870a826a2558634196c45d36
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.1-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL kalast-0.5.1-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
db5cd4c64b3b6b1779342ed754ad63dbc3f56a9d82095e4b8d93b1efa3cde39e
BLAKE2b-256 checksum
How to use checksums
293738b34df14ff1cf40584c2e1655856a04b7263264a16033523937ce8b121b
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.1-cp314-abi3-macosx_11_0_arm64.whl

Download URL kalast-0.5.1-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
0d9c21fca9760ba180303feba8cd42a9469e6f704f029f30270aa3d603da28c8
BLAKE2b-256 checksum
How to use checksums
06922a57e502126228d064c3d8e167509d7e119e81fea932a5110c39c9f6e542
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.1-cp314-abi3-macosx_10_12_x86_64.whl

Download URL kalast-0.5.1-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
af4d68ba92ac628789829682d30c7650f5b40d96d4c5cc06b75d560dbbe1dc88
BLAKE2b-256 checksum
How to use checksums
b4d1ab0710a33270bae1fbc69f8460cad90df6b4c7018fafa722f1f19ec40eb6
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

0.5.2

5 release files

This release

0.5.1 This release

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