# Satellite raster guide runner

This script accompanies <https://os.disclosure.org/v2/docs/satellite> and uses the
profile APIs published in `@disclosureos/schema@2.0.0-beta.4`.

## Run with the published package

Use Node.js 22, npm and a ZIP extractor. Create a project, install the exact
package version, then download the fictional source files and runner:

```sh
mkdir disclosureos-satellite-beta4
cd disclosureos-satellite-beta4
npm init -y
npm install --save-exact @disclosureos/schema@2.0.0-beta.4
curl --fail --location https://os.disclosure.org/examples/meridian.zip --output meridian.zip
unzip meridian.zip
curl --fail --location https://os.disclosure.org/examples/v2/satellite/check-satellite.mjs --output check-satellite.mjs
node check-satellite.mjs meridian/satellite-v1
```

Keep the runner in this npm project so its package import resolves to the
installed Beta 4 release. No standard-source build is required for these checks.

## Rebuild the fixture (optional)

The guide also explains how to regenerate the synthetic data from standard
commit `e19a89793871d23fb036e59c75ff83c86e21dfad`. Use a separate checkout for that
reproduction. This retained source revision identifies the fixture generator;
it does not replace the published package used above.

## Results and diagnostic examples

The runner reads the four contract documents and the trusted example's local file index. It loads both arrays, evaluates them, then prints cell 4845, its projected bounds and five availability examples. Array indices and byte offsets are zero-based. It never fetches artifact URLs.

Use one diagnostic at a time:

```sh
node check-satellite.mjs meridian/satellite-v1 --missing-quality
node check-satellite.mjs meridian/satellite-v1 --changed-quality
node check-satellite.mjs meridian/satellite-v1 --inconsistent-quality
```

- `--missing-quality` withholds the quality array from the in-memory asset map.
- `--changed-quality` changes cell 4845 from clear to no-data while retaining its original digest.
- `--inconsistent-quality` makes the same change and updates the three in-memory digest declarations. Source integrity passes, but quality consistency fails because all six band values remain present. This is a controlled counterexample, never a repair for unexpected bytes.

Each deliberate failure exits with status 1 before selected-cell output. Unsupported or extra arguments exit with usage status 2. No mode writes files. Rerun without a flag to recover the original passing result.

A passing result verifies document bindings, source integrity, supported array/grid declarations and content consistency. It does not verify physical calibration, quality accuracy or geographic registration. Missing bands remain `null`; retained zeros are valid, while an NDVI denominator of zero is undefined. A clear quality label does not guarantee complete bands. The authored grid does not depict a real location or supply an acquisition time.

Full guide: <https://os.disclosure.org/v2/docs/satellite>
