Support DiaObject catalogs#104
Merged
Merged
Conversation
…rcedSource)
- rubin_dp.py: obj="dia" opens dia_object_collection / diaObjectForcedSource
(cal and diff photometry). Object-level psfMag/extendedness are absent, so
object_mag is derived from {band}_scienceFluxMean and extendedness is set to
0.0 (point-source assumption; TODO: cross-match the science Object catalog
for a real per-object extendedness). The object magnitude is not required for
dia, since it does not affect the whitening.
- mag_flux.py: add flux2mag (inverse of mag2flux).
- train_on_rubin_dp.py: ignore missing coord_ra/coord_dec when dropping columns
(the DiaObject catalog uses ra/dec instead).
- scripts/plot_reduced_chi2.py, scripts/plot_kl.py: add --obj/--img overrides so
a trained model can be applied to a different catalog/photometry type.
hombit
enabled auto-merge
July 20, 2026 18:42
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #104 +/- ##
==========================================
- Coverage 53.22% 52.99% -0.24%
==========================================
Files 32 32
Lines 2018 2040 +22
==========================================
+ Hits 1074 1081 +7
- Misses 944 959 +15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for the Rubin DiaObject catalog so a model trained on the Object catalog can be applied to
diaObjectForcedSourcelight curves.obj="dia"opensdia_object_collection/diaObjectForcedSource(bothimg="cal"psfFlux andimg="diff"psfDiffFlux). The per-source model features (flux/err, visit-derivedskyBg/seeing/expTime, detector geometry, one-hot bands) come through unchanged. The two object-level features DiaObjects lack are handled as:object_mag— derived from{band}_scienceFluxMeanvia the newflux2mag; not required for dia (undefined values kept), since it does not affect the whitening.extendedness— set to0.0(point-source assumption), with aTODOto cross-match the science Object catalog for the real per-object value.Changes
datasets/rubin_dp.py:obj="dia"branches in_open_catalog;_normalize_dia_object_columns; relaxed theobject_magdropna for dia.utils/mag_flux.py: addflux2mag(inverse ofmag2flux).pipelines/train_on_rubin_dp.py: ignore missingcoord_ra/coord_dec(DiaObject usesra/dec).scripts/plot_reduced_chi2.py,scripts/plot_kl.py:--obj/--imgoverrides.Notes