Metadata-Version: 2.4
Name: sidereel
Version: 0.1.0
Summary: Sidereel, an interactive N-body sandbox with a Qt desktop.
Author: Nate Bosma
License-Expression: MIT
Project-URL: Homepage, https://github.com/AllHailSeizure/sidereel
Project-URL: Repository, https://github.com/AllHailSeizure/sidereel
Project-URL: Issues, https://github.com/AllHailSeizure/sidereel/issues
Keywords: n-body,astronomy,simulation,pyqt
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: matplotlib>=3.8
Requires-Dist: pillow>=10
Requires-Dist: PyQt6>=6.5
Provides-Extra: dev
Requires-Dist: pytest>=7.4; extra == "dev"
Requires-Dist: ruff==0.17.3; extra == "dev"
Dynamic: license-file

# Sidereel

A planar N-body sandbox. Build a system, watch gravity work, keep the picture.

![Sun, Earth, and Jupiter through one year](docs/orbit.gif)

One year of the Sun, Earth, and Jupiter, rendered by `sidereel-cli`.

## Features

- Unsoftened Newtonian gravity in the plane. Masses pull on each other. Test particles only fall.
- A fixed-step Yoshida integrator. A close encounter halts the run and keeps the last good state.
- A PyQt6 window filled by the sky. Menu, or M, lays a sidebar over the scene. The view stays put.
- Four starting experiments: the Solar System, a star at twice the Sun's mass, Earth and the Moon, 32 asteroids in a ring at 3.2 AU.
- A CLI that integrates the system and writes a PNG. No display required.
- Starting setups saved as JSON. Calculate a recording, then play the samples.
- An isolated planet holds its period to a relative 1e-7. At 1 AU, solar gravity sits about 30 ppm above JPL's GM, inside a 1e-4 bound.

## Prerequisites and installation

Python 3.10 or newer.

```bash
pipx install sidereel
```

`sidereel` opens the desktop. `sidereel-cli` renders.

The project is not on PyPI yet. Until the first release, install from git:

```bash
pipx install git+https://github.com/AllHailSeizure/sidereel
```

From a checkout:

```bash
pip install -e .
```

On Debian and Ubuntu the desktop also needs `libegl1` and `libopengl0`.

## Usage

Open the GUI:

```bash
sidereel
```

You get the experiment list. `sidereel-cli` with no arguments opens the same window.

Render the year in the picture:

```bash
sidereel-cli --star sun --planet earth --planet jupiter --years 1 --output output/sidereel.png
```

Starting positions only. The default is the Sun, Earth, and Jupiter:

```bash
sidereel-cli --output output/start.png
```

Inner planets, half a year:

```bash
sidereel-cli --star sun --planet mercury --planet venus --planet earth --years 0.5 --output output/inner.png
```

`--star` is `proxima`, `sun`, `sirius`, or `rigel`. Repeat `--planet` for each body: `mercury`, `venus`, `earth`, `mars`, `jupiter`, `saturn`, `uranus`, `neptune`, `pluto`, `ceres`.

`--years` works only with `--output`. So do `--sample-stride` and `--max-recording-mib`. Name bodies without `--output` and the Matplotlib window opens instead.

In a checkout, `python -m simulations.star_system` is the same program. `sidereel-cli --help` lists every flag.

## License

MIT. Copyright 2026 Nate Bosma. See [LICENSE](LICENSE).
