diff --git a/pipelines/coaddQualityCore.yaml b/pipelines/coaddQualityCore.yaml index d88f43a3d..edcde2652 100644 --- a/pipelines/coaddQualityCore.yaml +++ b/pipelines/coaddQualityCore.yaml @@ -63,7 +63,7 @@ tasks: atools.sersicIndexVsSersicMag: ColumnMagnitudeScatterPlot atools.sersicIndexVsSersicMag.mag_x: "sersic_err" atools.sersicIndexVsSersicMag.key_y: "sersic_index" - atools.sersicIndexVsSersicMag.produce.plot.yAxisLabel: "Sersic index" + atools.sersicIndexVsSersicMag.produce.plot.yAxisLabel: "Sérsic index" atools.sersicIndexVsSersicMag.produce.plot.xLims: (17, 29) atools.sersicIndexVsSersicMag.produce.plot.yLims: (0.4, 6.1) atools.sersicIndexVsSersicMag.produce.plot.legendLocation: "upper right" diff --git a/python/lsst/analysis/tools/actions/plot/scatterplotWithTwoHists.py b/python/lsst/analysis/tools/actions/plot/scatterplotWithTwoHists.py index 70b09291c..3c6eaa0f7 100644 --- a/python/lsst/analysis/tools/actions/plot/scatterplotWithTwoHists.py +++ b/python/lsst/analysis/tools/actions/plot/scatterplotWithTwoHists.py @@ -462,6 +462,11 @@ def _scatterPlot( highStats: _StatsContainer lowStats: _StatsContainer + magLabel = self.magLabel + kwargs_in_label = {k: v for k, v in kwargs.items() if f"{{{k}}}" in magLabel} + if kwargs_in_label: + magLabel = magLabel.format(**kwargs_in_label) + for name_datatype in self.plotTypes: config_datatype = self._datatypes[name_datatype] highArgs = {} @@ -543,7 +548,7 @@ def _scatterPlot( sigMadYs = nanSigmaMad(ys) # plot lone median point if there's not enough data to measure more n_xs = np.count_nonzero(np.isfinite(xs)) - if n_xs <= 1 or not (np.isfinite(sigMadYs) and sigMadYs > 0.0): + if n_xs <= 1 or not (np.isfinite(sigMadYs) and sigMadYs >= 0.0): continue elif n_xs < min_n_xs_for_stats: xs = [nanMedian(xs)] @@ -677,9 +682,7 @@ def _scatterPlot( # Add some stats text xPos = 0.65 - 0.4 * j bbox = dict(edgecolor=color, linestyle="--", facecolor="none") - statText = ( - f"S/N > {highThresh:0.4g} Stats ({self.magLabel} < {highStats.approxMag:0.4g})\n" - ) + statText = f"S/N > {highThresh:0.4g} Stats ({magLabel} < {highStats.approxMag:0.4g})\n" highStatsStr = ( f"Median: {highStats.median:0.4g} " + r"$\sigma_{MAD}$: " @@ -691,7 +694,7 @@ def _scatterPlot( fig.text(xPos, 0.090, statText, bbox=bbox, transform=fig.transFigure, fontsize=6) bbox = dict(edgecolor=color, linestyle=":", facecolor="none") - statText = f"S/N > {lowThresh:0.4g} Stats ({self.magLabel} < {lowStats.approxMag:0.4g})\n" + statText = f"S/N > {lowThresh:0.4g} Stats ({magLabel} < {lowStats.approxMag:0.4g})\n" lowStatsStr = ( f"Median: {lowStats.median:0.4g} " + r"$\sigma_{MAD}$: "