Skip to content

Preserve archive frame IDs during calibration registration - #490

Open
timbeccue wants to merge 1 commit into
mainfrom
fix/calibration-registration-frameids
Open

timbeccue wants to merge 1 commit into
mainfrom
fix/calibration-registration-frameids

Conversation

@timbeccue

@timbeccue timbeccue commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Problem

Some calimages entries set frameid == NULL even when the frame exists in the archive. This happens when the database is updated via add_super_calibration or add_bpms_from_archive:

  • Importing existing BPMs from the archive, e.g. banzai_populate_bpms --db-address "$DB_ADDRESS"
  • Uploading a manually prepared calibration frame
banzai_add_super_calibration /path/to/readnoise.fits \
    --db-address "$DB_ADDRESS" \
    --upload-to-archive
  • Re-importing a calibration whose database ID was already correct

Changes

  • Pass the Archive response’s id into DataProduct in add_bpms_from_archive.
  • Pass the ingester response’s frameid into DataProduct in add_super_calibration
  • Removecal_image.frameid assignment in add_super_calibration (looks like dead code?)

Registering an existing filename without uploading continues to set its archive ID to NULL. Existing NULL rows remain unchanged.

Validation

  • Added two regression tests covering BPM import and super-calibration registration with and without upload.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant