Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pipelines/coaddQualityCore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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}$: "
Expand All @@ -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}$: "
Expand Down
Loading