diff --git a/python/lsst/summit/extras/animation.py b/python/lsst/summit/extras/animation.py index 011b681..11940a0 100644 --- a/python/lsst/summit/extras/animation.py +++ b/python/lsst/summit/extras/animation.py @@ -38,7 +38,6 @@ from lsst.atmospec.utils import airMassFromRawMetadata, getTargetCentroidFromWcs from lsst.pipe.tasks.quickFrameMeasurement import QuickFrameMeasurementTask, QuickFrameMeasurementTaskConfig from lsst.summit.utils.butlerUtils import ( - datasetExists, getDayObs, getExpRecordFromDataId, getLatissOnSkyDataIds, @@ -177,9 +176,7 @@ def preRun(self) -> None: # check the datasets exist for the pngs which need remaking missingData = [ - d - for d in dIdsWithoutPngs - if not datasetExists(self.butler, self.dataProductToPlot, d, detector=0) + d for d in dIdsWithoutPngs if not self.butler.exists(self.dataProductToPlot, d, detector=0) ] logger.info(f"Of the provided {len(self.dataIdList)} dataIds:") diff --git a/python/lsst/summit/extras/focusAnalysis.py b/python/lsst/summit/extras/focusAnalysis.py index d55b5c7..641b019 100644 --- a/python/lsst/summit/extras/focusAnalysis.py +++ b/python/lsst/summit/extras/focusAnalysis.py @@ -253,7 +253,7 @@ def getFocusData(self, dayObs: int, seqNums: list[int], doDisplay: bool = False) arrowy, arrowx = centroid[0] - 400, centroid[1] # numpy is backwards dx, dy = 0, 300 arrow = Arrow(arrowy, arrowx, dy, dx, width=200.0, color="red") - circle = Circle(centroid, radius=25, facecolor="none", color="red") + circle = Circle(centroid, radius=25, facecolor="none", edgecolor="red") axes[0].add_patch(arrow) axes[0].add_patch(circle) for i, bbox in enumerate(spectrumSliceBboxes): @@ -376,7 +376,6 @@ def fitDataAndPlot(self, hideFit: bool = False, hexapodZeroPoint: float = 0) -> axes[0].legend(pointsForLegend, legendText, fontsize=legendFontSize) axes[1].legend(pointsForLegend, legendText, fontsize=legendFontSize) f.tight_layout(rect=(0, 0.03, 1, 0.95)) - plt.show() for i, bestFit in enumerate(bestFits): print(f"Best fit for spectrum slice {i} = {bestFit:.4f}mm") @@ -633,7 +632,6 @@ def fitDataAndPlot(self) -> dict: ax1.legend() plt.subplots_adjust(hspace=0.0) - plt.show() results = { "fwhmFitMin": fwhmFitMin, diff --git a/tests/test_focusAnalysis.py b/tests/test_focusAnalysis.py index 703b173..9bd454d 100644 --- a/tests/test_focusAnalysis.py +++ b/tests/test_focusAnalysis.py @@ -28,6 +28,7 @@ mpl.use("Agg") + import lsst.summit.utils.butlerUtils as butlerUtils # noqa: E402 from lsst.summit.extras import NonSpectralFocusAnalyzer, SpectralFocusAnalyzer # noqa: E402 @@ -54,6 +55,7 @@ def setUpClass(cls): def test_run(self): # we don't check the plots, but set doDisplay to True to check the # plots are generated without error + self.focusAnalyzer.getFocusData(self.dayObs, self.seqNums, doDisplay=True) result = self.focusAnalyzer.fitDataAndPlot() self.assertIsInstance(result, Iterable)