Skip to content

Commit

Permalink
Merge branch 'tickets/DM-46567'
Browse files Browse the repository at this point in the history
  • Loading branch information
taranu committed Oct 3, 2024
2 parents 164a520 + e3c3848 commit f11f2fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ def getOutputSchema(self) -> KeyedDataSchema:
return result

def getPercentileName(self, percentile: float) -> str:
return f"{percentile:.2f}pc"
return f"{percentile:.2f}_pct".replace(".", "p")
17 changes: 11 additions & 6 deletions python/lsst/analysis/tools/atools/diffMatched.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,15 +610,10 @@ def finalize(self):
action.name_purity_good_match: unit_select,
}
)
setattr(
self.produce.metric.actions,
object_class,
BaseMetricAction(units=units),
)

completeness_plot = CalcCompletenessHistogramAction(
action=CalcBinnedCompletenessAction(
name_prefix=f"{name_prefix_class}plot_",
name_prefix=name_prefix_class,
selector_range_ref=RangeSelector(vectorKey=key_mag_ref),
selector_range_target=RangeSelector(vectorKey=key_mag_target),
key_mask_ref=name_selector_ref,
Expand All @@ -637,6 +632,16 @@ def finalize(self):
completeness_plot.getPercentileName(pct)
)
units[name_pct] = unit_select

# Make the metric action for the given object class
# This will include units for metrics from the plot histogram
# (i.e. the magnitude for a given completeness threshold)
setattr(
self.produce.metric.actions,
object_class,
BaseMetricAction(units=units),
)

if self.make_plots:
setattr(
self.produce.plot.actions,
Expand Down

0 comments on commit f11f2fe

Please sign in to comment.