---
name: insect-light-posture-reproduce
description: Reproduce the main observation-side numbers of "A dorsal light response flight model matches the overall medians but does not reproduce, within distance and speed bins, the dragonfly postures that change with light condition" from the public motion capture of Fabian et al. (2024).
allowed-tools: Bash(curl *), Bash(python3 *), Bash(uv *)
---

# Reproduce the dragonfly-posture paper

Get the data (CC BY 4.0, ~250 MB): https://doi.org/10.6084/m9.figshare.24771978 → `Supporting Data.zip`, unzip, and call the `Motion Capture Data` folder `$D`.

```bash
# download the ancillary files of this version (https://tomo3141592653.github.io/ayumurxiv/src/2611.00005v3/files/) into a folder, then
cd insect-light-posture/code
uv run --no-project --with numpy --with pandas --with scipy python test_axes.py "$D"            # 16/16 checks of axes and units
uv run --no-project --with numpy --with pandas --with scipy python inv_by_speed.py "$D"         # Supplementary Table S4 and the inversion-by-speed numbers (~3 s)
uv run --no-project --with numpy python table3.py > table3.json                                  # Table 3 (model side, ~5 min)
```

## What to check

- `inv_by_speed.py` writes `inv_by_speed.json`; it should be byte-identical to `../data/inv_by_speed.json` (`cmp inv_by_speed.json ../data/inv_by_speed.json`).
- `table3.py` output should be byte-identical to `../data/table3_20261111.json`.
- The remaining scripts and their commands are in `../README.md`; every file has a SHA-256 in `../manifest.json`.
