Skip to content

Commit

Permalink
Merge pull request #792 from lsst/tickets/DM-39203
Browse files Browse the repository at this point in the history
DM-39203: Add a moment-based star-galaxy classifier
  • Loading branch information
arunkannawadi committed Jan 30, 2024
2 parents 1d4cb95 + ec04b45 commit b835282
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/lsst/pipe/tasks/calibrateImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ def setDefaults(self):
"base_CircularApertureFlux",
"base_GaussianFlux",
"base_PsfFlux",
"base_ClassificationSizeExtendedness",
]
self.psf_source_measurement.slots.shape = "ext_shapeHSM_HsmSourceMoments"
# Only measure apertures we need for PSF measurement.
Expand Down Expand Up @@ -301,6 +302,7 @@ def setDefaults(self):
"base_GaussianFlux",
"base_PsfFlux",
"base_CircularApertureFlux",
"base_ClassificationSizeExtendedness",
]
self.star_measurement.slots.psfShape = "ext_shapeHSM_HsmPsfMoments"
self.star_measurement.slots.shape = "ext_shapeHSM_HsmSourceMoments"
Expand Down
1 change: 1 addition & 0 deletions python/lsst/pipe/tasks/characterizeImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def setDefaults(self):
"base_GaussianFlux",
"base_PsfFlux",
"base_CircularApertureFlux",
"base_ClassificationSizeExtendedness",
]
self.measurement.slots.shape = "ext_shapeHSM_HsmSourceMoments"

Expand Down
10 changes: 10 additions & 0 deletions schemas/Object.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,14 @@ funcs:
functor: Column
args: base_ClassificationExtendedness_value
dataset: meas
refSizeExtendedness:
functor: Column
args: base_ClassificationSizeExtendedness_value
dataset: ref
sizeExtendedness:
functor: Column
args: base_ClassificationSizeExtendedness_value
dataset: meas
# lcPeriodic: # Not computed. Need multi-epoch forced phot S19
# lcNonPeriodic: # Not computed. Need without multi-epoch forced phot S19
# photoZ: # Not computed yet
Expand Down Expand Up @@ -760,6 +768,7 @@ flags:
- base_PixelFlags_flag_streak
- base_PixelFlags_flag_streakCenter
- base_ClassificationExtendedness_flag
- base_ClassificationSizeExtendedness_flag
- calib_astrometry_used
- calib_photometry_reserved
- calib_photometry_used
Expand Down Expand Up @@ -836,6 +845,7 @@ flag_rename_rules:
- ['base_Blendedness', 'blendedness']
- ['base_PixelFlags_flag', 'pixelFlags']
- ['base_ClassificationE', 'e']
- ['base_ClassificationS', 's']
- ['base_Psf', 'psf']
- ['base_CircularApertureFlux', 'apFlux']
- ['base_FootprintArea', 'footprintArea']
Expand Down
5 changes: 5 additions & 0 deletions schemas/Source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ funcs:
extendedness:
functor: Column
args: base_ClassificationExtendedness_value
sizeExtendedness:
functor: Column
args: base_ClassificationSizeExtendedness_value
flags:
- base_LocalPhotoCalib
- base_LocalPhotoCalib_flag
Expand Down Expand Up @@ -350,6 +353,7 @@ flags:
- base_CircularApertureFlux_50_0_instFlux
- base_CircularApertureFlux_50_0_instFluxErr
- base_ClassificationExtendedness_flag
- base_ClassificationSizeExtendedness_flag
- base_FootprintArea_value
- base_Jacobian_flag
- base_Jacobian_value
Expand Down Expand Up @@ -430,6 +434,7 @@ flag_rename_rules:
- ['base_Local', 'local']
- ['base_PixelFlags_flag', 'pixelFlags']
- ['base_ClassificationE', 'e']
- ['base_ClassificationS', 's']
- ['base_SdssCentroid', 'centroid']
- ['base_Variance', 'variance']
- ['base_Psf', 'psf']
Expand Down
1 change: 1 addition & 0 deletions tests/test_isolatedStarAssociation.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def _make_simdata(self,
('apFlux_12_0_instFluxErr', 'f4'),
('apFlux_12_0_instFlux_flag', '?'),
('extendedness', 'f4'),
('sizeExtendedness', 'f4'),
('detect_isPrimary', bool),
('visit', 'i4'),
('detector', 'i4'),
Expand Down

0 comments on commit b835282

Please sign in to comment.