Description
This blocker comes from the external review of #228 (ChatGPT batch 32, claim A3).
testing_described.py:89-95 yields member.image_count once for each technical repeat, and :128-152 writes that many images into each unit. But image_count belongs to the member: it is the total over the member's units, and reconciliation sums the unit counts and compares the sum with it (description_reconcile.py:242-263).
In fixture v34, CTRL/rep1 has image_count = 12 over two technical repeats, so the helper writes 24 images instead of 12. DrugA/rep1 has 11 and gets 22. The regression (tests/test_make_described_run.py:25-32) computes its expected count the same wrong way, so it passes while the biological N is wrong.
Fix:
- Spread exactly
member.image_countimages across the member's technical repeats, deterministically. - Every technical repeat gets at least one image. If
image_count < len(technical_repeats), refuse to build that fixture rather than invent an empty unit.
Regression: build v34 and check against counts computed independently of the helper:
- CTRL/rep1 has exactly 12 FOVs over
acq1andacq2. - DrugA/rep1 has exactly 11.
- Both
acq1andacq2appear. - For every
(condition_id, repeat_group), the total FOV count equals the parsedmember.image_count.
Activity