Skip to content

maintenance: anonymise the named science target in the WFC3-IR hole regression #73

Description

@Jammy2211

Overview

Library repos must not carry science-specific paths or named science targets. The WFC3-IR mosaic-hole regression in autoreduce — the reason the IR adapter ships STScI's MDRIZTAB DQ-bit rows instead of drizzlepac's final_bits = "0" default — is named after the real target it was found on. Rename every reference to the generic regression it actually encodes (HST program 14653, F160W, five-exposure mosaic, 123-px hole at r = 5.3") and drop the target name. Comment/name text only: no behaviour change, no API change, no test-outcome change.

Plan

  • Reword the DQ-bit rationale comment in the WFC3-IR adapter so it cites the program/filter/exposure-count rather than the target name.
  • Rename the regression test to describe the dataset shape it guards (test_five_exposure_f160w_mosaic_would_not_have_holed) and reword its comment the same way.
  • Reword the "Blobs (DQ 512)" paragraph in the WFC3 design doc so the failing dataset is identified generically.
  • Sweep the whole repo for any remaining occurrence of the target name and fix anything tracked; leave the gitignored local drizzle cache alone.
  • Run the autoreduce test suite to confirm the rename is behaviour-neutral, then ship.
Detailed implementation plan

Work Classification

Library (PyAutoReduce source + its own tests + its own design docs). No workspace follow-up: nothing user-facing changes, and the renamed test is referenced nowhere outside its own file.

Affected Repositories

  • PyAutoReduce (primary)

Branch Survey

Repository Current Branch Dirty?
./PyAutoReduce main clean

Recent branches: main only. worktree_check_conflict clean — no active task claims PyAutoReduce (the two open tasks claim autolens_profiling, PyAutoArray, PyAutoGalaxy).

Suggested branch: feature/anonymise-wfc3-ir-hole-regression-target
Worktree root: ~/Code/PyAutoLabs-wt/anonymise-wfc3-ir-hole-regression-target/

Implementation Steps

  1. autoreduce/instruments/wfc3_ir.py (~L37) — in the dq_bits_rows rationale comment, replace (PJ011646, 5 exposures, a 123-px hole at r = 5.3") with (program 14653, F160W, 5 exposures, a 123-px hole at r = 5.3"); reflow the following comment lines so the block stays inside the line budget.
  2. test_autoreduce/test_target_and_instruments.py (L157-161) — rename test_pj011646_would_not_have_holedtest_five_exposure_f160w_mosaic_would_not_have_holed, and reword its body comment to describe an HST program 14653 F160W five-exposure mosaic. Assertions untouched.
  3. docs/design/wfc3.md (~L52) — in the "Blobs (DQ 512)" paragraph, replace the sentence subject PJ011646 (program 14653, F160W, 5 exposures, 2–6 px dithers) with a generic An HST program 14653 dataset (F160W, 5 exposures, 2–6 px dithers); reflow the paragraph.
  4. grep -rIn -i pj011646 --exclude-dir=.git over the repo → must return nothing tracked. scripts/cache/cache_manifest.json is gitignored (.gitignore:17 scripts/cache/) and does not contain the name in any case.
  5. Run the suite in the task worktree (source activate.sh, python3 -m pytest test_autoreduce -q) — every test must pass, including the renamed one, with the same count as before.

Key Files

  • autoreduce/instruments/wfc3_ir.py — WFC3-IR adapter; carries the dq_bits_rows table and the comment explaining why it exists.
  • test_autoreduce/test_target_and_instruments.py — the DQ-bits regression legs; the renamed test asserts final_bits & 512 at numimages = 5.
  • docs/design/wfc3.md — the WFC3 design note whose "Blobs (DQ 512)" section narrates the failure.

Trade-offs / risks

  • The Brain's feature pass flags "public-API change may ripple downstream" from its generic heuristics; that does not apply here — no exported symbol changes, and the renamed identifier is a pytest method referenced only in its own file.
  • The regression's provenance stays recoverable: PyAutoMind history records (complete/, condemned.md, autonomy_log.md) are deliberately not touched — they are records of work that happened.

Original Prompt

Click to expand starting prompt
# Anonymise the named science target in the WFC3-IR hole regression

Type: maintenance
Target: PyAutoReduce
Repos:
- PyAutoReduce
Difficulty: small
Autonomy: safe
Priority: low
Status: formalised

# Anonymise the named science target in the WFC3-IR hole regression

Type: maintenance
Difficulty: small
Autonomy: safe
Priority: low

Library repos must not name science targets — "these repos shouldnt have science specific paths". The WFC3-IR mosaic-hole regression in autoreduce is named after the real target it was found on. Rename the references to the generic regression (HST program 14653, F160W, 5-exposure mosaic with a 123-px hole) and drop the target name:
- `autoreduce/instruments/wfc3_ir.py:37` (comment)
- `test_autoreduce/test_target_and_instruments.py:157-158` (test name `test_pj011646_would_not_have_holed` and its comment)
- `docs/design/wfc3.md:52`

No behaviour change. Mind history records (complete/, condemned.md, autonomy_log.md) stay untouched — they are records of work that happened.

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