wormbench 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. wormbench/__init__.py +13 -0
  2. wormbench/_data/benchmark/PROVENANCE.md +322 -0
  3. wormbench/_data/benchmark/bands.json +356 -0
  4. wormbench/_data/benchmark/bands_v2.json +5946 -0
  5. wormbench/_data/benchmark/bands_v3.json +5977 -0
  6. wormbench/_data/benchmark/bands_v4.json +6038 -0
  7. wormbench/_data/benchmark/classifier.json +113 -0
  8. wormbench/_data/benchmark/lopezcruz2019_reference.json +105 -0
  9. wormbench/_data/benchmark/lopezcruz2019_split.json +44 -0
  10. wormbench/_data/benchmark/scheer_tracker_noise.npz +0 -0
  11. wormbench/_data/example/example.zip +0 -0
  12. wormbench/_data/example/expected_v4.json +129 -0
  13. wormbench/_data/kappa_v1.json +11 -0
  14. wormbench/_data/manifest.json +94 -0
  15. wormbench/_data/roaming_dwelling/PROVENANCE.md +156 -0
  16. wormbench/_data/roaming_dwelling/calibration_retry.json +65 -0
  17. wormbench/_data/roaming_dwelling/reference_hmm.json +36 -0
  18. wormbench/_data/urls.json +11 -0
  19. wormbench/_data/validity.json +20 -0
  20. wormbench/bands.py +195 -0
  21. wormbench/builder.py +339 -0
  22. wormbench/chemotaxis.py +261 -0
  23. wormbench/classifier.py +433 -0
  24. wormbench/cli.py +280 -0
  25. wormbench/data.py +208 -0
  26. wormbench/grade.py +577 -0
  27. wormbench/grading.py +858 -0
  28. wormbench/measurement.py +316 -0
  29. wormbench/odour_field.py +103 -0
  30. wormbench/readouts.py +280 -0
  31. wormbench/records.py +74 -0
  32. wormbench/references.py +303 -0
  33. wormbench/track_export.py +327 -0
  34. wormbench/track_import.py +576 -0
  35. wormbench-1.0.1.dist-info/METADATA +168 -0
  36. wormbench-1.0.1.dist-info/RECORD +40 -0
  37. wormbench-1.0.1.dist-info/WHEEL +4 -0
  38. wormbench-1.0.1.dist-info/entry_points.txt +2 -0
  39. wormbench-1.0.1.dist-info/licenses/LICENSE +201 -0
  40. wormbench-1.0.1.dist-info/licenses/NOTICE +20 -0
wormbench/__init__.py ADDED
@@ -0,0 +1,13 @@
1
+ """Grade simulated or real *C. elegans* tracks against real-worm behaviour.
2
+
3
+ The benchmark reads 1-s positions alone and grades them on standard on-lawn and off-food assays:
4
+ Scheer & Bargmann's small lawn and uniform well, López-Cruz et al.'s local search after food
5
+ removal, the kinematics and activity of worms on a lawn, and Chen et al.'s butanone chemotaxis.
6
+ Each statistic is graded against bands built from the spread between real recording dates.
7
+
8
+ The package depends on numpy and scipy only, and imports nothing outside itself.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ __version__ = "1.0.1"
@@ -0,0 +1,322 @@
1
+ # Benchmark reference data
2
+
3
+ Derived files only: each is produced from its public deposit by
4
+ `scripts/analysis/extract_benchmark_references.py`, and read back by
5
+ `quantumnematode.benchmark.references`. The deposits are not vendored. Positions are stored as
6
+ integers, a stated unit times a fixed factor, with the integer type's minimum marking a missing value.
7
+
8
+ ## `scheer2023_tracks.npz` and `scheer2023_split.json`
9
+
10
+ - **Citation:** Scheer, E. & Bargmann, C. I. (2023). Sensory neurons couple arousal and foraging
11
+ decisions in *Caenorhabditis elegans*. *eLife* 12:RP88657.
12
+
13
+ - **Deposit:** Dryad doi:10.5061/dryad.47d7wm3jf, mirrored at Zenodo record 8310289. **Licence:**
14
+ CC0-1.0. The authors' analysis code (github.com/BargmannLab/Scheer_Bargmann2023, MIT) defines each
15
+ field (`LawnLeavingAnalysis/preProcessing.py`).
16
+
17
+ - **Source files** (downloaded 2026-10-24, scripted from Zenodo; neither is vendored):
18
+
19
+ - `GenotypeComparisons_021523.pkl`, 20,597,126,711 bytes, MD5 `41d93e6b65725890908c2acb611d8208` as
20
+ published;
21
+ - `PD1074_od2_Fig1_021523.pkl`, 4,871,119,532 bytes, MD5 `f8556a4684e7a7f30a3dc01242591556` as
22
+ published, read only to match its animals.
23
+
24
+ - **How it was read:** through the restricted unpickler in `scripts/analysis/_scheer_pickle.py`
25
+ (only the 18 numpy, pandas, `slice` and `datetime.date` classes the deposit references are
26
+ admitted, each by exact name; the `ssm` classes are replaced by stand-ins). The
27
+ genotype file was written with pandas 1.x: its numeric index classes are read as `pandas.Index`, as
28
+ pandas' own `read_pickle` reads them.
29
+
30
+ - **Arms** (deposit keys), 2,847 animals of 40 min at 3 frames/s:
31
+
32
+ | Arm | Animals | Dates |
33
+ |---|---|---|
34
+ | `PD1074_od2_Data` (wild type, OD 2) | 1,586 | 65 |
35
+ | `PD1074_od1_Data` | 45 | 1 |
36
+ | `PD1074_od4_Data` | 83 | 3 |
37
+ | `PD1074_od2_uniformlawn_Data` | 100 | 3 |
38
+ | `N2_od2_Data` (wild type, the N2 strain) | 1,380 | 70 |
39
+ | `MT15434_tph1mg280_od2_Data` (tph-1) | 139 | 5 |
40
+ | `CX14295_pdfr1ok3425_od2_Data` (pdfr-1) | 395 | 16 |
41
+ | `CX13078_tax4p678_od2_Data` (tax-4) | 499 | 19 |
42
+
43
+ N2 is the batch-matched control of tph-1, an N2-background strain recorded only beside N2: all five
44
+ of tph-1's dates have N2 animals and none has PD1074. pdfr-1 shares 11 of its 16 dates with PD1074
45
+ and 2 with N2; tax-4 shares 17 of 19 with PD1074. The two wild-type strains are separate arms, never
46
+ pooled.
47
+
48
+ - **Positions** (`x_um`, `y_um`, int16 µm): the midbody (`Midbody_cent_x/y`) at frames 0, 3, 6, …,
49
+ divided by the animal's own `pixpermm` (median 116 px/mm, so a pixel is about 8.6 µm), from its lawn
50
+ centre. −32768 marks a missing frame.
51
+
52
+ - **The lawn's geometry.** The lawn is re-detected in each background segment of a recording.
53
+ `Center_Point_x/y` has one column per background slot (20), and `Lawn_Boundary_Pts_x/y` one 360-point
54
+ polygon per slot in a block of rows per animal; unused slots hold 0 or NaN. A frame's slot is its
55
+ `bgvidindex` (1-based). Each animal's centre is the median over the slots its frames use (99th
56
+ percentile of the centre's spread across slots: 11–66 µm by arm), and its 64 boundary radii
57
+ (`boundary_um`) the median of those slots' radii about that centre.
58
+
59
+ - **Checked against the authors':** the signed midbody distance to this boundary differs from their
60
+ `Centroid_Lawn_Boundary_Dist` by a median of 0.022–0.025 mm by arm (95th percentile ≤ 0.085 mm),
61
+ and its sign agrees with their `MidbodyInLawn` on 99.0–99.8% of samples. Their
62
+ `Lawn_Boundary_Dist` is the head's distance (it agrees with `HeadInLawn` on every frame), so it is
63
+ not the comparison.
64
+ - **The uniform lawn** has no boundary fields, nor `HeadPokesAll` or `MidbodyInLawn` (stored as
65
+ zero). Its positions are from each animal's first valid position (`origin = 1`), and its radii are
66
+ the sentinel.
67
+
68
+ - **Flags** (`frame_flags`, bit-packed per frame): bit 0 `MovingReverse`, 1 `Omega`, 2 `Pause`, 3
69
+ `HeadPokesAll`, 4 `MidbodyInLawn`, 5 `missingdata`. `MovingReverse` and `Pause` are the authors'
70
+ thresholds on midbody speed. Every `Omega` run touches `missingdata`: the skeleton fails while the
71
+ worm coils.
72
+
73
+ - **Per-bin fields** (10 s, 240 bins): `in_lawn_run` (`InLawnRunMask`), `out_lawn_run`
74
+ (`OutLawnRunMask`) and `labels` (`RD_states_Matrix_exog`: 1 roaming, 0 dwelling, −1 masked).
75
+
76
+ - **Cohort fields:** `genotype` (index into `genotypes`), `date` (YYYYMMDD, parsed by the authors from
77
+ the video name), `video` (index into `videos`), `source_row`, and `fig1_row`, the animal's row in the
78
+ Fig. 1 file. All 1,586 Fig. 1 animals match `PD1074_od2_Data` by video and source file, in the same
79
+ order, with equal positions.
80
+
81
+ - **Reproduces D.1's windows.** Re-deriving the 5-s windows from this store reproduces
82
+ `data/roaming_dwelling/scheer2023_windows.npz` on every Fig. 1 animal: masks, labels and missing
83
+ windows identical, speeds within the rounding's bound (worst 0.25 µm/s against 0.28), the calibrated
84
+ model's likelier emission state on 99.92% and its decoded states on 99.96% of on-food windows
85
+ (`tests/quantumnematode_tests/benchmark/test_scheer_store.py`).
86
+
87
+ - **The split** (`scheer2023_split.json`): cohorts are recording dates, everything on a date on one
88
+ side. It was drawn from each animal's date and arm alone, before any behavioural statistic was
89
+ computed, by `extract_benchmark_references.py split` (seed 2027, draw k = 16 of at most 10,000).
90
+ The OD 2 wild type has 24 of 65 dates held out (36% of its animals), N2 28 of 70 (39%), tph-1 2 of 5
91
+ (25%), pdfr-1 6 of 16 (35%), tax-4 7 of 19 (38%), OD 4 and the uniform lawn 1 of 3 each. OD 1 was
92
+ recorded on one date and has no held-out cohort. **Held out means held out of the bands, not unseen
93
+ by the instrument:** the roaming/dwelling classifier was calibrated on an animal-level split (seed
94
+ 2026\) across every wild-type date, and `scheer2023_leaving.json` used every wild-type animal.
95
+
96
+ - **Size:** 32.5 MB.
97
+
98
+ - **Commands:** `extract_benchmark_references.py scheer --genotypes GenotypeComparisons_021523.pkl --fig1 PD1074_od2_Fig1_021523.pkl --out data/benchmark/scheer2023_tracks.npz --record <record.json>`, then `extract_benchmark_references.py split --tracks data/benchmark/scheer2023_tracks.npz --out data/benchmark/scheer2023_split.json`.
99
+
100
+ ## `calhoun2014_tracks.npz`
101
+
102
+ - **Citation:** Calhoun, A. J., Chalasani, S. H. & Sharpee, T. O. (2014). Maximally informative foraging
103
+ by *Caenorhabditis elegans*. *eLife* 3:e04220.
104
+ - **Deposit:** Dryad doi:10.5061/dryad.3j2j9. **Licence:** CC0-1.0.
105
+ - **Download:** 2026-10-24, by browser (Dryad's API refuses scripted downloads), as the dataset zip
106
+ `doi_10_5061_dryad_3j2j9__v20151128.zip`, SHA-256
107
+ `67f12c9470aa74b885557ee6f3280b16d64102aabf6b1ad2e42a574e41a0d0fc`. Its inner `Wormdata.xlsx` is
108
+ 5,731,077 bytes, SHA-256 `f7974224c7a2f0a2e31f16a1d4a55ba696ee5c3b9db7837202cef7e58e3b411d`.
109
+ - **Assay** (the paper's methods): animals taken off food and corralled in a 1-inch square by filter
110
+ paper soaked in 200 mM CuSO₄, recorded for 30 min at 3 frames/s. The authors ignore the first 2 min.
111
+ - **Contents:** 47 worms × 5,400 frames, from the sheets `X position`, `Y position`, `Pirouettes`,
112
+ `Omega turns` and `Non-omega turns`.
113
+ - **Positions** are in pixels. Neither the paper nor the file states a pixel scale, so they are
114
+ vendored in pixels (`units = "px"`) and serve only unit-free statistics: turn timing and rates,
115
+ never speeds or distances. They are sampled at 1 s (every third frame) and stored as hundredths of
116
+ a pixel (`x_cpx`, `y_cpx`, int32).
117
+ - **Missing positions:** 27,902 cells are "NaN". Another 27 cells hold malformed text ("272.6.",
118
+ "Na3", …); they are counted at extraction and treated as missing rather than guessed.
119
+ - **Flags** (`frame_flags`, bit-packed per frame at 3 frames/s): pirouette (bit 0), omega (bit 1)
120
+ and non-omega turn (bit 2). Each is a one-frame onset marker. The deposit's `Non-omega turns` sheet
121
+ is all zeros. `Pirouettes` has 5,406 columns against 5,400 elsewhere: aligned at the start, every
122
+ one of the 709 omega onsets coincides with a pirouette flag, and at any other offset none does, so
123
+ its last six columns are dropped. There are 3,966 pirouette onsets.
124
+ - **No cohort fields:** Calhoun validates a reorientation detector but cannot serve as a
125
+ cohort-held-out control.
126
+ - **Command:** `extract_benchmark_references.py calhoun --xlsx Wormdata.xlsx --out data/benchmark/calhoun2014_tracks.npz`.
127
+
128
+ ## `roberts2016_tracks.npz`
129
+
130
+ - **Citation:** Roberts, W. M., Augustine, S. B., Lawton, K. J., Lindsay, T. H., Thiele, T. R.,
131
+ Izquierdo, E. J., Faumont, S., Lindsay, R. A., Britton, M. C., Pokala, N., Bargmann, C. I. &
132
+ Lockery, S. R. (2016). A stochastic neuronal model predicts random search behaviors at multiple
133
+ spatial scales in *C. elegans*. *eLife* 5:e12572.
134
+ - **Deposit:** Dryad doi:10.5061/dryad.35qv6. **Licence:** CC0-1.0.
135
+ - **Download:** 2026-10-24, by browser, as `doi_10_5061_dryad_35qv6__v20160203.zip`, SHA-256
136
+ `fc7aaec5ceaafe5489d8611469c0bcc1ba4802e11477bd913e80943b58866cea`. Its inner
137
+ `wormtracks archive.zip` is 222,322,502 bytes, SHA-256
138
+ `11b27aa8a0ccae0dd37274765eff7704e8c5da20fe2062b5877bd8cf2f7947be`.
139
+ - **Format:** Igor binary waves (versions 2 and 5), read by a minimal reader in the extraction script.
140
+ What each wave means is taken from the authors' program, `wormtracks.ipf` (296,502 bytes), in the
141
+ same archive:
142
+ - `xx`, `yy`: the tracking spot's position in **mm** (the program computes speed as
143
+ `fps * sqrt(dx² + dy²)`, "converted to mm/sec");
144
+ - **29.97 frames/s** (`fps=29.97`);
145
+ - `worm`: the worm number at each frame;
146
+ - `state`: per frame, **2 forward, 1 reverse, 0 paused**. The README calls these "the initial state
147
+ identifications that were made by eye when the data were collected"; the program calls them the
148
+ tracker's forward/reverse classifications;
149
+ - `IBW files/C<n>_Viterbi.ibw`: the authors' four-state decoding, codes **0 X, 1 R, 2 F, 3 Y**
150
+ (`stateX=0, stateR=1, stateF=2, stateY=3`), where X is a pause after forward movement and Y one
151
+ after reversal. The program drops two points at each end of every worm before decoding, and the
152
+ store pads those with −1.
153
+ - **Contents:** the five intact wild-type cohorts in the archive's `Wild type/` folder (C15, C21, C57,
154
+ C162 and C186: 122 worms of about 9 min each) and the four dead-worm tracks in `dead worm/`, a
155
+ tracking-noise floor. Positions are sampled at the frame nearest each whole second and stored in µm
156
+ (`x_um`, `y_um`, int32: C103 reaches 47.5 mm, beyond int16). The tracker and Viterbi states are
157
+ kept per frame (`state`, `viterbi`), −1 outside each worm's recording.
158
+ - **Not vendored**, named by the program's figure labels: wild-type ablation controls C103, C111,
159
+ C113, C117 and C175; ablations C104 (AVB), C110 (PVC), C112 (AVE), C116 (AVD) and C176 (AVA); the DEP
160
+ mutant cohorts C14 and C19; and the HYP mutant cohorts C16, C20 and C56.
161
+ - **Command:** `extract_benchmark_references.py roberts --archive <extracted archive> --out data/benchmark/roberts2016_tracks.npz`.
162
+
163
+ ## `lopezcruz2019_reorientations.json`
164
+
165
+ - **Citation:** López-Cruz, A., Sordillo, A., Pokala, N., Liu, Q., McGrath, P. T. & Bargmann, C. I.
166
+ (2019). Parallel multimodal circuits control an innate foraging behavior. *Neuron* 102:407–419.
167
+ - **Deposit:** Mendeley Data doi:10.17632/prdtw5jgcd.1. **Licence:** CC BY 4.0.
168
+ - **Download:** 2026-10-24, scripted from Mendeley's public API: `CompleteForagingAssayData.xls`,
169
+ 155,648 bytes, SHA-256 `1ee8cf962883d2d37456cab7eb48d646921ce8644b26c81e76f7267d7aa596f2`.
170
+ - **Contents:** every row of the sheet `data_2min_bins` ("Values in the table: Average # of
171
+ reorientations ± S.E.M"), 184 rows. Each keeps its genotype, figure, recording dates and N, and each
172
+ of 22 2-min bins from 0 to 44 min after removal (the sheet marks 0–2 min "not plotted") as a mean and
173
+ SEM parsed from the "m +/- s" text; "N/A" cells are null. Each mutant row is linked to the nearest
174
+ wild-type row above it with the same dates (`control_row`), where one exists.
175
+ - **D37's mutants:** pdfr-1 (ok3425) is present (row 91, N = 56, beside wild type N = 57 on the same
176
+ dates). tax-4 and tph-1 are absent.
177
+ - **Command:** `uv run --with xlrd python scripts/analysis/extract_benchmark_references.py lopezcruz --xls CompleteForagingAssayData.xls --out data/benchmark/lopezcruz2019_reorientations.json`
178
+ (`xlrd` reads the legacy `.xls`; the project does not depend on it).
179
+
180
+ ## `lopezcruz2019_reference.json`
181
+
182
+ - **What it is:** the local-search reference, fitted from `lopezcruz2019_reorientations.json` (SHA-256
183
+ `3a8b42babbb75f39abaea216b480cd18acf053ff047f2aa77d56c906e584d6b7`) by `scripts/analysis/local_search_reference.py`. It is derived from López-Cruz et al. 2019,
184
+ so carries that deposit's licence. **Licence:** CC BY 4.0.
185
+ - **Time zero:** food removal. The deposited bins are recording time, which began 4 min after removal,
186
+ so a bin labelled \[a, a + 2) min covers \[a + 4, a + 6) min after removal.
187
+ - **The fit:** alpha * exp(-gamma * (t - t0)) + beta by least squares on the Fig. 1C wild type's bin
188
+ means (row 3, n = 413), over recording 4–40 min (8–44 min after removal, 18 bins). It starts at the
189
+ wild type's peak bin, with t0 = 9 min. gamma = 0.114 per min, with a 95% interval of [0.101, 0.127]
190
+ from a parametric bootstrap over the bins' mean and SEM (2,000 resamples, seed 107).
191
+ - **Described beside it:** starting one bin earlier gives gamma 0.087, one bin later 0.138; pdfr-1
192
+ (row 91) gives 0.143 against 0.184 for its same-dates wild type (row 90).
193
+
194
+ ## `chen2025_tracks.npz`
195
+
196
+ - **Citation:** Chen, K. S., et al. (2025). Navigation strategies in *Caenorhabditis elegans* are
197
+ differentially altered by learning. *PLoS Biology*, doi:10.1371/journal.pbio.3003005.
198
+
199
+ - **Deposit:** figshare article 24764403, doi:10.6084/m9.figshare.24764403. **Licence:** CC BY 4.0.
200
+
201
+ - **Download:** 2026-10-27, by browser (figshare refuses scripted downloads), as the article bundle
202
+ `24764403.zip` (3,495,605,829 bytes), SHA-256
203
+ `94b59ead0f2a1ef3807f5e5c883c48db4ae30f5dfec8e2b126ccd080543572da`. It contains:
204
+
205
+ - `Chen_learning_2024.zip`, 3,495,425,046 bytes, SHA-256
206
+ `6fee42b5c4a616f342b94d5fa40f2d598badcc650f8a2ee8cc9ee788d29fe363`;
207
+ - `S1_Data.xlsx`, 180,465 bytes, SHA-256
208
+ `e0894b03c2a314048cccf8e75ddc8c914f967be228b53abc934123500895b51d`.
209
+
210
+ - **Assay** (the paper's methods): butanone in linear gradients on 10 cm square plates, off food,
211
+ 30 min at 14 frames/s, 50–100 worms per plate. The naive condition is vendored; the learned
212
+ conditions and the mutants are not.
213
+
214
+ - **What was read** (MATLAB files inside `Chen_learning_2024.zip`, read with `scipy.io.loadmat`):
215
+
216
+ - `temp/data4plots/track_learn_all.mat`: tracks by condition and recording, condition 1 naive, in
217
+ the order of `temp/data4plots/learn_folders4.mat`'s `folder_nai`. That gives 8 naive N2 recordings
218
+ on 8 dates. Six are on the standard protocol (`Data_learn/N2/*_11mM_35_400*`: 2022-08-30, 09-13,
219
+ 09-22, 11-08, 2023-06-09, 06-13). Two were run on another flow rig (`Data_odor_flow_equ`:
220
+ 2022-08-04 "biased", 2022-02-03 "6_32ml_400air") and are labelled `off_protocol`;
221
+ - `temp/track_data/rawTracks_N2nai.mat`: read only to measure the pixel scale, the median ratio of
222
+ the authors' `SmoothSpeed` (mm/s) to the same smoothed track's speed in pixels per second, over
223
+ 5,898 tracks: **0.03009 mm per pixel** (IQR 0.02979–0.03021), an imaged field of about 90 × 75 mm;
224
+ - `temp/data4plots/Landscape_low_0623_2.mat`: `vq1`, the measured odour landscape, 2500 × 3000
225
+ pixels, in the authors' concentration units. It is **stored rotated by 180°**: sampled at
226
+ `(W − 1 − x, H − 1 − y)`, it reproduces the concentration the authors record along their tracks
227
+ (`temp/data4plots/Data_nai_test2.mat`'s `dc`), correlation 1.0000. The vendored field is rotated
228
+ back and kept every 5 pixels (0.150 mm cells). Sampled bilinearly, it still reproduces the
229
+ recorded concentrations (correlation 1.0000, median absolute difference 0.042).
230
+
231
+ - **Contents:**
232
+
233
+ - 10,717 track fragments, 568,834 s in all, each resampled to whole seconds by linear interpolation
234
+ of the 14-frame/s `Path`, in µm (`x_um`, `y_um`, int32);
235
+ - each fragment's recording, first second and length;
236
+ - each recording's date, protocol and folder;
237
+ - the field (`field`, float32, indexed `[y, x]`, `field_cell_mm`).
238
+
239
+ Tracks are fragments: they break when worms collide or leave the field.
240
+
241
+ - **Checksum:** SHA-256 `9320d320ffca780aa7f7ae56abf0c8b0cb7993fbbcd58d990f6765b4500b91c4` as written.
242
+
243
+ - **Command:** `extract_benchmark_references.py chen --archive <Chen_learning_2024.zip> --out data/benchmark/chen2025_tracks.npz`.
244
+
245
+ ## `classifier.json`
246
+
247
+ - **Derived by** `scripts/analysis/benchmark_classifier.py` from `scheer2023_tracks.npz`, on band
248
+ cohorts only. It is the benchmark's roaming/dwelling model:
249
+ - a two-state Gaussian HMM on each 10-s window's log speed and angular speed, read from 1-s
250
+ positions at 5 s;
251
+ - fitted against Scheer & Bargmann's own labels on two thirds of the OD 2 wild type's band dates
252
+ (seed 2029), and gated at Cohen's κ ≥ 0.6 on the other third;
253
+ - the file holds the split, the gate's reading and the parameters.
254
+ - **Licence:** CC0-1.0, as its source.
255
+ - **Checksum:** SHA-256 `e4a059de3d5b826d4fa2a99e61b3ed0f0cdefb3790ccfc4c8e38eefbb23b8239` as written. Its inputs' deposits are checked by
256
+ MD5 above.
257
+
258
+ ## `lopezcruz2019_split.json`
259
+
260
+ - **Derived by** `scripts/analysis/benchmark_bands.py` from `lopezcruz2019_reorientations.json`.
261
+ López-Cruz 2019's wild-type batches, one per distinct date string among the `wt` rows, are split
262
+ a third held out (seed 2031). pdfr-1's same-date control batch is kept in the bands.
263
+ - **Licence:** CC BY 4.0, as its source (Mendeley 10.17632/prdtw5jgcd.1).
264
+ - **Checksum:** SHA-256 `da2d4a6144ce2072f2a0d352c97a7e7eb1dd6b98a53c4e915ff0b1c3d9428315` as written.
265
+
266
+ ## `bands.json`
267
+
268
+ - **Derived by** `scripts/analysis/benchmark_bands.py` from the files above, reading band cohorts and
269
+ band batches only. It holds every graded statistic's centre and scale at populations of 64 and
270
+ 200, the families, the bars, the weights, and the rule for W's minimum.
271
+ - Scheer's arms use a cluster bootstrap over band dates (seed 2030). Each scale holds the centre's
272
+ own uncertainty and a calibration factor measured on band-date half-splits (seed 2033).
273
+ - Each band at each size draws from its own generator, `default_rng([2030, band, n])`, so a band
274
+ built on demand at n equals the vendored one.
275
+ - Mutant directions come from a paired t-test across paired band dates.
276
+ - López-Cruz's band uses a Student-t prediction interval over its band batches.
277
+ - The rule's own checks on band data (seed 2034) are recorded in
278
+ `docs/experiments/logbooks/supporting/109-benchmark-grading/bands_record.json`.
279
+ - **Licence:** CC0-1.0 for the parts from Scheer & Bargmann, and CC BY 4.0 for the parts from
280
+ López-Cruz et al.
281
+ - **Checksum:** SHA-256 `44122f9077b5911e1c5519ded43b558ffad2433e7b1315334aa41e02c3cb64a0` as written.
282
+
283
+ ## `scheer_tracker_noise.npz`
284
+
285
+ - **Derived by** `scripts/analysis/benchmark_v2_controls.py noise-library` from `scheer2023_tracks.npz`. It is the real tracker's readings of a still worm, which B v2's lawn measurement model resamples as simulated tracks' position noise.
286
+ - **The stretches:** PD1074's band dates are split by `default_rng(2043).permutation` into a library half (21 dates) and a check half (20). The library holds the library half's paused stretches: runs of at least 10 s whose seconds have all three frames flagged `pause` and a position.
287
+ - **What is stored:** 6,213 stretches, 93,248 s. Each holds its offsets from its own mean position, x and y, in whole micrometres (`x_um`, `y_um`, int32), stored consecutively with their `lengths`.
288
+ - **Licence:** CC0-1.0, as Scheer & Bargmann's deposit.
289
+ - **Checksum:** SHA-256 `328bfbcece5c8ba21b7fe23c183d4a6efe14f9c88f56d46e0d555e36007ee1f4` as written.
290
+
291
+ ## `bands_v2.json`
292
+
293
+ - **Derived by** `scripts/analysis/benchmark_bands.py --version v2` from the files above, on band cohorts only. It holds:
294
+ - v1's bands;
295
+ - the kinematics bands (five graded statistics, generator `default_rng([2030, 5, n])`) and the chemotaxis bands (Chen's six standard recordings);
296
+ - the measurement models: the lawn model names `scheer_tracker_noise.npz` and its checksum, and Chen's rig keeps its Gaussian jitter;
297
+ - the five families, the 19-statistic bar (z\* 3.0078) and the weights.
298
+ - **The record:** κ, the rule checks and the chemotaxis leave-one-out are in `docs/experiments/logbooks/supporting/115-benchmark-v2/bands_v2_record.json`.
299
+ - **Licence:** CC0-1.0 for the parts from Scheer & Bargmann, and CC BY 4.0 for the parts from López-Cruz et al. and Chen et al.
300
+ - **Checksum:** SHA-256 `21f591b864d497ee3ee305c217e3c9e197a8bc466298219d46841819b875f438` as written.
301
+
302
+ ## `bands_v3.json`
303
+
304
+ - **Derived by** `scripts/analysis/benchmark_bands.py --version v3` from the files above, on band cohorts only. It holds:
305
+ - v2's small-lawn, uniform-well, mutant and kinematics bands and its measurement models, unchanged;
306
+ - local search's bands on γ and the log early/late ratio, from López-Cruz's 17 band batches;
307
+ - chemotaxis's bands on five statistics (v2's three, the onset rate and the direction-flip fraction), from Chen's six standard recordings;
308
+ - the five families, the 21-statistic bar (z\* 3.0381) and the weights;
309
+ - the reported reversal share's reference, from Roberts' tracker states.
310
+ - **The record:** the rule checks and the chemotaxis leave-one-out are in `docs/experiments/logbooks/supporting/120-benchmark-v3/bands_v3_record.json`.
311
+ - **Licence:** CC0-1.0 for the parts from Scheer & Bargmann and Roberts et al., and CC BY 4.0 for the parts from López-Cruz et al. and Chen et al.
312
+ - **Checksum:** SHA-256 `8af38429a692914100a87ac9ebefc2cd8a22229e970ee1d67396fa25b4bb427b` as written.
313
+
314
+ ## `bands_v4.json`
315
+
316
+ - **Derived by** `scripts/analysis/benchmark_bands.py --version v4` from the files above, on band cohorts only, then `--onset graded`, which records the onset decision from the reachability oracle's check. It holds:
317
+ - every v3 band, its measurement models and its reference, unchanged;
318
+ - the activity family's bands on the pause share (below 0.02 mm, the still-worm library's floor), the on-lawn direction-flip fraction and the on-lawn onset rate, from Scheer & Bargmann's 41 PD1074 OD 2 band dates, with each statistic's κ;
319
+ - the six families, the 24-statistic bar (z\* 3.0781) and the weights.
320
+ - **The record:** the pause floor, κ and the rule checks at both bars are in `docs/experiments/logbooks/supporting/124-benchmark-v4/bands_v4_record.json`.
321
+ - **Licence:** CC0-1.0 for the parts from Scheer & Bargmann and Roberts et al., and CC BY 4.0 for the parts from López-Cruz et al. and Chen et al.
322
+ - **Checksum:** SHA-256 `355177a62e3fed4d314179f6aaac8c58cac55776b2b8deef9e64422a968f2448` as written.