Skip to content

Add source-quality columns and code for h5 migration - #48

Open
jeanconn wants to merge 2 commits into
stack/01-astroquery-and-hrc-scalefrom
stack/02-source-quality-columns
Open

Add source-quality columns and code for h5 migration#48
jeanconn wants to merge 2 commits into
stack/01-astroquery-and-hrc-scalefrom
stack/02-source-quality-columns

Conversation

@jeanconn

@jeanconn jeanconn commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Description

  • add new source-quality fields to the database and source-detection pipeline:
    psfratio, concentration_ratio, grating_arm, brightest, and
    peak_offset
  • add a database/h5 migration for existing tables
  • expand DB, observation, and source-detection coverage for the new columns

We haven't really decided what final set of source quality columns will be used, but this adds a few that could be useful.

Interface Impacts

  • astromon_xray_src gains the source-quality columns psfratio,
    concentration_ratio, grating_arm, brightest, and peak_offset
  • observation outputs and persisted source rows now expose those fields
  • downstream code that reads astromon tables can start depending on the new columns

Testing

  • adds unit tests for the DB migration, the new xray-source columns in persisted
    tables, and the observation/source-detection plumbing that fills them

Migration

  • no standalone action at this PR boundary
  • when the full stack is approved and merged, run
    astromon/scripts/migrate_db.py before deploying code that expects the new
    columns

Unit tests

  • Mac
$ python -m pytest astromon/ -v
============================= test session starts ==============================
platform darwin -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
collected 105 items
astromon/tests/test_cross_match.py ..................... (21 passed)
astromon/tests/test_db.py .................. (18 passed)
astromon/tests/test_observation.py ................. (17 passed)
astromon/tests/test_source_detection.py .......... (10 passed)
astromon/tests/test_stored_result.py ................ (16 passed)
astromon/tests/test_task.py ....sssssssssssssss.s.. (7 passed, 16 skipped — skips require HEAD/network access)
======================= 89 passed, 16 skipped in 27.40s ========================

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

No functional testing.

@jeanconn
jeanconn force-pushed the stack/02-source-quality-columns branch from e1d512a to 248f95a Compare September 2, 2026 18:47
@jeanconn
jeanconn marked this pull request as ready for review September 2, 2026 18:49
@jeanconn
jeanconn requested a review from javierggt September 8, 2026 17:54
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