Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
bechtol committed Jul 28, 2022
1 parent d3d7671 commit 98f50bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/lsst/analysis/tools/actions/scalar/scalarActions.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ def __call__(self, data: KeyedData, **kwargs) -> Scalar:
values = values[np.logical_not(np.isnan(values))]
result = np.sum(getattr(operator, self.op)(values, self.threshold)) / len(values)
if self.percent:
return 100. * result
return 100.0 * result
else:
return result
16 changes: 12 additions & 4 deletions python/lsst/analysis/tools/analysisPlots/analysisPlots.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,19 +210,27 @@ def setDefaults(self):
self.process.buildActions.perGroupCount = PerGroupStatistic()
self.process.buildActions.perGroupCount.buildAction.vectorKey = f"{self.fluxType}"
self.process.buildActions.perGroupStdev = PerGroupStatistic()
self.process.buildActions.perGroupStdev.buildAction = MagColumnNanoJansky(vectorKey=f"{self.fluxType}")
self.process.buildActions.perGroupStdev.buildAction = MagColumnNanoJansky(
vectorKey=f"{self.fluxType}"
)
self.process.buildActions.perGroupStdev.func = "std"

# Filter on per-group quantities
self.process.filterActions.perGroupStdevFiltered = DownselectVector(vectorKey="perGroupStdev")
self.process.filterActions.perGroupStdevFiltered.selectors.count = ThresholdSelector(
vectorKey="perGroupCount", op="ge", threshold=3,
vectorKey="perGroupCount",
op="ge",
threshold=3,
)
self.process.filterActions.perGroupStdevFiltered.selectors.sn = ThresholdSelector(
vectorKey="perGroupSn", op="ge", threshold=200,
vectorKey="perGroupSn",
op="ge",
threshold=200,
)
self.process.filterActions.perGroupStdevFiltered.selectors.extendedness = ThresholdSelector(
vectorKey="perGroupExtendedness", op="le", threshold=0.5,
vectorKey="perGroupExtendedness",
op="le",
threshold=0.5,
)

self.process.calculateActions.xStars = LoadVector(vectorKey="perGroupSn")
Expand Down

0 comments on commit 98f50bc

Please sign in to comment.