# Ephemeris N16 Generator

This Apache-2.0-licensed tool downloads 16 object-specific SPKs directly from
JPL Horizons and creates a local `n16-states-f64.bin` file for the Ephemeris
calculation core.

No precomputed N16 state table is distributed with this tool.

## Requirements

- Python 3.11 or newer
- NumPy 2.4.x
- SpiceyPy 8.1.x with its CSPICE runtime

Install the dependencies:

```text
python -m pip install -r requirements.txt
```

Run the artificial-data verification tests:

```text
python -m unittest test_n16_common.py -v
```

Create and verify the data in the platform-specific default directory:

```text
python n16_generate.py
python n16_verify.py
```

Choose a directory explicitly:

```text
python n16_generate.py --output D:\Astronomy\Ephemeris-N16
set EPHEMERIS_N16_DIRECTORY=D:\Astronomy\Ephemeris-N16
```

On Linux or macOS use the corresponding shell syntax for the environment
variable.

The generator performs sequential requests and waits one second between
Horizons object requests by default. It verifies the generated table and writes
source URLs, object identifiers, units, coverage and SHA-256 values to
`manifest.json`.

Use `--keep-source-spk` only when the original source kernels are needed
locally. They are removed after successful generation by default.

Display the legal boundaries:

```text
python n16_generate.py --licenses
python n16_generate.py --data-terms
```

See the accompanying `LICENSE`, `THIRD-PARTY-NOTICES.md` and
`DATA-SOURCES-AND-TERMS.md`.
