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 kalast UI app
./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 kalast UI app 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.3

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.3
File Size Uploaded
kalast-0.5.3.tar.gz 939.8 kB Details

Built distributions (wheels)

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

Download URL kalast-0.5.3.tar.gz
Size 939.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d974a6e2d08a08d174c26865939ed558d71ef516db567982485e1de77f718a1c
BLAKE2b-256 checksum
How to use checksums
bc6ff8cecacc937852eaea425269b9449e1397411e9453af2604eb94d2eab712
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 22, 2026.

Transparency log

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

Download URL kalast-0.5.3-cp314-abi3-win_amd64.whl
Size 8.0 MB
Tags CPython 3.14 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
249d6fdbc383c5a703ca275a0cdfed77d3f1b0120d03e1aaf4edce8a500418f2
BLAKE2b-256 checksum
How to use checksums
afed6377a376c0c110ca8f360012ca99f30fadf9a2995751ec5aea6335db21b2
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 22, 2026.

Transparency log

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

Download URL kalast-0.5.3-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
37c4dad656e2dd27c9ab357573483924d5ee5d9e3b5e3bced7cd692b4341937d
BLAKE2b-256 checksum
How to use checksums
8a0052d0a35541102dc4a62463f8cdec2fadc8bf4d46b05c221b6d037284faef
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 22, 2026.

Transparency log

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

Download URL kalast-0.5.3-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
b5c7582874fb83f46968dbe7a993bdb1efdce11ac7e4f218282b4f79fbfde997
BLAKE2b-256 checksum
How to use checksums
43873aea9e73fb76b5c0ed093ebac96a2c99f750de59b1e0e2f26e34464f760c
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 22, 2026.

Transparency log

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

Download URL kalast-0.5.3-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
e9831503aba9332cb063a62d62c26f89e8dc3dbb699773f4f90d6b62c82883cb
BLAKE2b-256 checksum
How to use checksums
a4610190116c504401409b93dfcdde6423a358674dba09443e95771eb3e8453b
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 22, 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

This release

0.5.3 This release

5 release files

0.5.2

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