Skip to content

Commit

Permalink
Resolve formatting issues as per black
Browse files Browse the repository at this point in the history
  • Loading branch information
rai-harshit committed Oct 12, 2023
1 parent 66a7093 commit f09d418
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 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 @@ -15,7 +15,7 @@
"FracNan",
"DivideScalar",
"CountThreshold",
"CountNan"
"CountNan",
)

import operator
Expand Down
26 changes: 13 additions & 13 deletions python/lsst/analysis/tools/atools/diaSourceMetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ def setDefaults(self):
super().setDefaults()

# Count dia sources with reliability lower than the threshold
self.process.calculateActions.numDiaSourcesHighReliability = CountThreshold(op="gt",
threshold=0.9,
vectorKey="reliability")
self.process.calculateActions.numDiaSourcesHighReliability = CountThreshold(
op="gt", threshold=0.9, vectorKey="reliability"
)

# The units for the quantity (count, an astropy quantity)
self.produce.metric.units = {"numDiaSourcesHighReliability": "ct"}
Expand All @@ -106,9 +106,9 @@ def setDefaults(self):
super().setDefaults()

# Count dia sources with reliability lower than the threshold
self.process.calculateActions.numDiaSourcesLowReliability = CountThreshold(op="lt",
threshold=0.1,
vectorKey="reliability")
self.process.calculateActions.numDiaSourcesLowReliability = CountThreshold(
op="lt", threshold=0.1, vectorKey="reliability"
)

# The units for the quantity (count, an astropy quantity)
self.produce.metric.units = {"numDiaSourcesLowReliability": "ct"}
Expand All @@ -134,19 +134,19 @@ def setDefaults(self):
super().setDefaults()

# Count dia sources with reliability higher than the threshold
self.process.buildActions.numDiaSourcesHighReliability = CountThreshold(op="gt",
threshold=0.9,
vectorKey="reliability")
self.process.buildActions.numDiaSourcesHighReliability = CountThreshold(
op="gt", threshold=0.9, vectorKey="reliability"
)

# Count dia sources with reliability lower than the threshold
self.process.buildActions.numDiaSourcesLowReliability = CountThreshold(op="lt",
threshold=0.1,
vectorKey="reliability")
self.process.buildActions.numDiaSourcesLowReliability = CountThreshold(
op="lt", threshold=0.1, vectorKey="reliability"
)

# Calculate ratio of good vs bad DIA Sources
self.process.calculateActions.DiaSourcesGoodVsBadRatio = DivideScalar(
actionA=self.process.buildActions.numDiaSourcesHighReliability,
actionB=self.process.buildActions.numDiaSourcesLowReliability
actionB=self.process.buildActions.numDiaSourcesLowReliability,
)

# The units for the quantity (dimensionless, an astropy quantity)
Expand Down

0 comments on commit f09d418

Please sign in to comment.