Skip to content

Add u- and v-band filter and photometric columns to target and fluxstd tables#141

Merged
monodera merged 2 commits into
mainfrom
tickets/OBSPROC-139
May 21, 2026
Merged

Add u- and v-band filter and photometric columns to target and fluxstd tables#141
monodera merged 2 commits into
mainfrom
tickets/OBSPROC-139

Conversation

@monodera
Copy link
Copy Markdown
Contributor

@monodera monodera commented May 21, 2026

Summary

  • Add filter_u, filter_v (FK → filter_name) and corresponding photometric columns (psf_flux, psf_flux_error, psf_mag, psf_mag_error, total_flux, total_flux_error, fiber_mag) to the target table
  • Add the same columns (except fiber_mag and total_flux) to the fluxstd table
  • Columns are inserted between the existing u/v and g-band positions (order: u, v, g, r, i, z, y, j)
  • FK constraint names follow the established {table}_{column}_fkey convention
  • Update schema documentation (docs/schema/target.md, docs/schema/fluxstd.md)
  • Include two Alembic migrations for pfsa-db01-gb:
    • 20260520-181828_5df293bb75f2: add u-band columns
    • 20260521-090910_31f82c75c58d: add v-band columns (also updates filter_u comment to include u_skymapper)

Test plan

  • Verify models import cleanly (python -c "from targetdb.models.target import target; from targetdb.models.fluxstd import fluxstd")
  • Run existing test suite (pytest tests/)
  • Apply migrations on dev database and confirm schema matches models
  • Confirm FK constraints target_filter_u_fkey, target_filter_v_fkey, fluxstd_filter_u_fkey, fluxstd_filter_v_fkey are present

🤖 Generated with Claude Code

monodera and others added 2 commits May 21, 2026 08:55
Add filter_u (FK to filter_name), psf_mag_u, psf_mag_error_u, psf_flux_u,
psf_flux_error_u, total_flux_u, total_flux_error_u (target only), and
fiber_mag_u (target only) columns before the existing g-band columns.
Includes Alembic migration with explicit FK constraint names following the
established {table}_{column}_fkey convention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add filter_v (FK to filter_name), psf_mag_v, psf_mag_error_v, psf_flux_v,
psf_flux_error_v, total_flux_v, total_flux_error_v (target only), and
fiber_mag_v (target only) columns between u-band and g-band columns.
Also update filter_u comments to include u_skymapper as an example.
Includes Alembic migration with explicit FK constraint names following the
established {table}_{column}_fkey convention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 21, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 2 duplication

Metric Results
Complexity 0
Duplication 2

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@monodera monodera merged commit f857601 into main May 21, 2026
2 checks passed
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