Skip to content

make_described_run writes image_count images per technical repeat instead of per member #234

Closed

Description

@guijacquemet

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_count images 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 acq1 and acq2.
  • DrugA/rep1 has exactly 11.
  • Both acq1 and acq2 appear.
  • For every (condition_id, repeat_group), the total FOV count equals the parsed member.image_count.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions