Skip to content

Commit

Permalink
Merge pull request #244 from lsst/tickets/DM-39141
Browse files Browse the repository at this point in the history
DM-39141: Add doRequirePrimary to star selector.
  • Loading branch information
erykoff committed May 26, 2023
2 parents 93dcef9 + 082f0dd commit b2c6b38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/lsst/jointcal/jointcal.py
Expand Up @@ -505,6 +505,8 @@ def validate(self):
logging.getLogger("lsst.jointcal").warning(msg)

def setDefaults(self):
# Use only primary stars.
self.sourceSelector["science"].doRequirePrimary = True
# Use only stars because aperture fluxes of galaxies are biased and depend on seeing.
self.sourceSelector["science"].doUnresolved = True
self.sourceSelector["science"].unresolved.name = "extendedness"
Expand Down Expand Up @@ -1604,6 +1606,8 @@ def get_sourceTable_visit_columns(inColumns, config, sourceSelector):
if sourceSelector.config.doRequireFiniteRaDec:
columns.append(sourceSelector.config.requireFiniteRaDec.raColName)
columns.append(sourceSelector.config.requireFiniteRaDec.decColName)
if sourceSelector.config.doRequirePrimary:
columns.append(sourceSelector.config.requirePrimary.primaryColName)

return columns, ixxColumns

Expand Down
2 changes: 2 additions & 0 deletions tests/config/config.py
Expand Up @@ -2,3 +2,5 @@

# jointcal test metrics were made including unresolved sources.
config.sourceSelector['science'].doUnresolved = False
# Test catalogs do not have detect_isPrimary
config.sourceSelector['science'].doRequirePrimary = False

0 comments on commit b2c6b38

Please sign in to comment.