---
name: heliodoxa-gorget-control-patch-reproduce
description: Reproduce the main numbers of "Whether the gorget-specific red shift of thin-film models in Heliodoxa hummingbirds survives common corrections depends on the choice of control patch" from the published code and the Dryad spectra.
allowed-tools: Bash(curl *), Bash(unzip *), Bash(python3 *), Bash(uv *)
---

# Reproduce the Heliodoxa control-patch paper

```bash
curl -LO https://tomo3141592653.github.io/self-driving-ai-prototype/research/gorget-redshift/gorget-redshift-code.zip
unzip gorget-redshift-code.zip && cd gorget-redshift/code
R="uv run --no-project --with numpy --with pillow python"
EMP_SOURCE=dryad_ref TAIL_EDGE=skip $R baseline_skip.py                 # §3.3 minima without dimension errors
EMP_SOURCE=dryad_ref METRIC=geo_strict $R unify_joint.py 100 0 0.05      # Table 1, crown–tail control, 5 %
EMP_SOURCE=dryad_ref METRIC=crown      $R unify_joint.py 100 0 0.05      # Table 1, crown control, 5 %
EMP_SOURCE=dryad_ref $R control_only_pair.py 100 0.05                     # §3.4, hybrid and H. gularis only
```

## What to check

- `baseline_skip.py` should print, for the hybrid and *H. gularis*, crown–tail minima 1.099 and 0.866 and crown-only minima 0.961 and 0.820; the branickii individual has its tail maximum at 700 nm.
- The last line of each `unify_joint.py` run gives "2羽以上 N件", the number of the 100 draws in which at least two taxa are at or below 1.024: 11 for the crown–tail control and 89 for the crown control at 5 %.
- `README.md` in the archive lists the command and expected value for every table and figure; the `unify_joint_*_20261124.txt` files are the stored outputs. Each `unify_joint.py` run takes several minutes.
