Skip to content

Commit a493cff

Browse files
authored
Merge pull request #134 from lsst/revert-90-tickets/DM-38974
Revert "DM-38974: Move photometric repeatability metrics from faro to analysis_tools"
2 parents 1f25b94 + 46b4c77 commit a493cff

File tree

6 files changed

+12
-66
lines changed

6 files changed

+12
-66
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ repos:
33
rev: v4.4.0
44
hooks:
55
- id: check-yaml
6-
args:
7-
- "--unsafe"
86
- id: end-of-file-fixer
97
- id: trailing-whitespace
108
- repo: https://github.com/psf/black
11-
rev: 23.1.0
9+
rev: 23.3.0
1210
hooks:
1311
- id: black
1412
# It is recommended to specify the latest version of Python
1513
# supported by your project here, or alternatively use
1614
# pre-commit's default_language_version, see
1715
# https://pre-commit.com/#top_level-default_language_version
18-
language_version: python3.11
16+
language_version: "python3.10"
1917
- repo: https://github.com/pycqa/isort
2018
rev: 5.12.0
2119
hooks:

pipelines/matchedVisitQualityCore.yaml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -23,53 +23,3 @@ tasks:
2323
atools.stellarAstrometricRepeatability3.process.calculateActions.rms.threshAD: 30
2424
python: |
2525
from lsst.analysis.tools.atools import *
26-
analyzeMatchedVisitExtended:
27-
class: lsst.analysis.tools.tasks.AssociatedSourcesTractAnalysisTask
28-
config:
29-
connections.outputName: matchedVisitExtended
30-
atools.modelPhotRepStarSn5to10: StellarPhotometricRepeatability
31-
atools.modelPhotRepStarSn5to10.fluxType: gaussianFlux
32-
atools.modelPhotRepStarSn5to10.process.filterActions.perGroupStdevFiltered.selectors.sn.minimum: 5
33-
atools.modelPhotRepStarSn5to10.process.filterActions.perGroupStdevFiltered.selectors.sn.maximum: 10
34-
atools.modelPhotRepStarSn5to10.produce.plot: NoPlot
35-
36-
atools.modelPhotRepStarSn10to20: StellarPhotometricRepeatability
37-
atools.modelPhotRepStarSn10to20.fluxType: gaussianFlux
38-
atools.modelPhotRepStarSn10to20.process.filterActions.perGroupStdevFiltered.selectors.sn.minimum: 10
39-
atools.modelPhotRepStarSn10to20.process.filterActions.perGroupStdevFiltered.selectors.sn.maximum: 20
40-
atools.modelPhotRepStarSn10to20.produce.plot: NoPlot
41-
42-
atools.modelPhotRepStarSn20to40: StellarPhotometricRepeatability
43-
atools.modelPhotRepStarSn20to40.fluxType: gaussianFlux
44-
atools.modelPhotRepStarSn20to40.process.filterActions.perGroupStdevFiltered.selectors.sn.minimum: 20
45-
atools.modelPhotRepStarSn20to40.process.filterActions.perGroupStdevFiltered.selectors.sn.maximum: 40
46-
atools.modelPhotRepStarSn20to40.produce.plot: NoPlot
47-
48-
atools.modelPhotRepStarSn40to80: StellarPhotometricRepeatability
49-
atools.modelPhotRepStarSn40to80.fluxType: gaussianFlux
50-
atools.modelPhotRepStarSn40to80.process.filterActions.perGroupStdevFiltered.selectors.sn.minimum: 40
51-
atools.modelPhotRepStarSn40to80.process.filterActions.perGroupStdevFiltered.selectors.sn.maximum: 80
52-
atools.modelPhotRepStarSn40to80.produce.plot: NoPlot
53-
54-
atools.psfPhotRepStarSn5to10: StellarPhotometricRepeatability
55-
atools.psfPhotRepStarSn5to10.process.filterActions.perGroupStdevFiltered.selectors.sn.minimum: 5
56-
atools.psfPhotRepStarSn5to10.process.filterActions.perGroupStdevFiltered.selectors.sn.maximum: 10
57-
atools.psfPhotRepStarSn5to10.produce.plot: NoPlot
58-
59-
atools.psfPhotRepStarSn10to20: StellarPhotometricRepeatability
60-
atools.psfPhotRepStarSn10to20.process.filterActions.perGroupStdevFiltered.selectors.sn.minimum: 10
61-
atools.psfPhotRepStarSn10to20.process.filterActions.perGroupStdevFiltered.selectors.sn.maximum: 20
62-
atools.psfPhotRepStarSn10to20.produce.plot: NoPlot
63-
64-
atools.psfPhotRepStarSn20to40: StellarPhotometricRepeatability
65-
atools.psfPhotRepStarSn20to40.process.filterActions.perGroupStdevFiltered.selectors.sn.minimum: 20
66-
atools.psfPhotRepStarSn20to40.process.filterActions.perGroupStdevFiltered.selectors.sn.maximum: 40
67-
atools.psfPhotRepStarSn20to40.produce.plot: NoPlot
68-
69-
atools.psfPhotRepStarSn40to80: StellarPhotometricRepeatability
70-
atools.psfPhotRepStarSn40to80.process.filterActions.perGroupStdevFiltered.selectors.sn.minimum: 40
71-
atools.psfPhotRepStarSn40to80.process.filterActions.perGroupStdevFiltered.selectors.sn.maximum: 80
72-
atools.psfPhotRepStarSn40to80.produce.plot: NoPlot
73-
python: |
74-
from lsst.analysis.tools.atools import *
75-
from lsst.analysis.tools.interfaces import *

python/lsst/analysis/tools/actions/vector/selectors.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ def setDefaults(self):
187187
class RangeSelector(VectorAction):
188188
"""Selects rows within a range, inclusive of min/exclusive of max."""
189189

190-
vectorKey = Field[str](doc="Key to select from data")
190+
key = Field[str](doc="Key to select from data")
191191
maximum = Field[float](doc="The maximum value", default=np.Inf)
192192
minimum = Field[float](doc="The minimum value", default=np.nextafter(-np.Inf, 0.0))
193193

194194
def getInputSchema(self) -> KeyedDataSchema:
195-
yield self.vectorKey, Vector
195+
yield self.key, Vector
196196

197197
def __call__(self, data: KeyedData, **kwargs) -> Vector:
198198
"""Return a mask of rows with values within the specified range.
@@ -206,10 +206,10 @@ def __call__(self, data: KeyedData, **kwargs) -> Vector:
206206
result : `Vector`
207207
A mask of the rows with values within the specified range.
208208
"""
209-
values = cast(Vector, data[self.vectorKey])
209+
values = cast(Vector, data[self.key])
210210
mask = (values >= self.minimum) & (values < self.maximum)
211211

212-
return cast(Vector, mask)
212+
return np.array(mask)
213213

214214

215215
class SnSelector(SelectorBase):

python/lsst/analysis/tools/atools/astrometricRepeatability.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,7 @@ def setDefaults(self):
231231

232232
# Select only sources with magnitude between 17 and 21.5
233233
self.process.filterActions.coord_ra = DownselectVector(vectorKey="coord_ra")
234-
self.process.filterActions.coord_ra.selector = RangeSelector(
235-
vectorKey="mags", minimum=17, maximum=21.5
236-
)
234+
self.process.filterActions.coord_ra.selector = RangeSelector(key="mags", minimum=17, maximum=21.5)
237235
self.process.filterActions.coord_dec = DownselectVector(
238236
vectorKey="coord_dec", selector=self.process.filterActions.coord_ra.selector
239237
)

python/lsst/analysis/tools/atools/diffMatched.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def configureMetrics(
146146
for minimum in range(self._mag_low_min, self._mag_low_max + 1):
147147
action = getattr(self.process.calculateActions, f"{name}{minimum}")
148148
action.selector_range = RangeSelector(
149-
vectorKey=x_key,
149+
key=x_key,
150150
minimum=minimum,
151151
maximum=minimum + self._mag_interval,
152152
)
@@ -180,7 +180,7 @@ def setDefaults(self):
180180
CalcBinnedStatsAction(
181181
key_vector=key,
182182
selector_range=RangeSelector(
183-
vectorKey=key,
183+
key=key,
184184
minimum=minimum,
185185
maximum=minimum + self._mag_interval,
186186
),

python/lsst/analysis/tools/atools/photometricRepeatability.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
LoadVector,
3737
MultiCriteriaDownselectVector,
3838
PerGroupStatistic,
39-
RangeSelector,
4039
ResidualWithPerGroupStatistic,
4140
SnSelector,
4241
ThresholdSelector,
@@ -94,9 +93,10 @@ def setDefaults(self):
9493
op="ge",
9594
threshold=3,
9695
)
97-
self.process.filterActions.perGroupStdevFiltered.selectors.sn = RangeSelector(
96+
self.process.filterActions.perGroupStdevFiltered.selectors.sn = ThresholdSelector(
9897
vectorKey="perGroupSn",
99-
minimum=200,
98+
op="ge",
99+
threshold=200,
100100
)
101101
self.process.filterActions.perGroupStdevFiltered.selectors.extendedness = ThresholdSelector(
102102
vectorKey="perGroupExtendedness",

0 commit comments

Comments
 (0)