Coverage for python / lsst / analysis / tools / atools / wholeTractImageTool.py: 47%
45 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-06 09:07 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-06 09:07 +0000
1# This file is part of analysis_tools.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (https://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <https://www.gnu.org/licenses/>.
21from __future__ import annotations
23__all__ = (
24 "WholeTractImageTool",
25 "WholeTractClippedMaskTool",
26 "WholeTractPostageStampTool",
27 "WholeTractNImageTool",
28)
30from ..actions.plot.calculateRange import Linear, MinMax
31from ..actions.plot.wholeTractImage import WholeTractImage
32from ..interfaces import AnalysisTool
35class WholeTractImageTool(AnalysisTool):
36 """Makes a figure displaying all coadd images covering a whole tract."""
38 propagateData = True
39 parameterizedBand = False
41 def setDefaults(self):
42 super().setDefaults()
44 self.prep.keysToLoad = ["image"]
45 self.produce.plot = WholeTractImage()
48class WholeTractClippedMaskTool(AnalysisTool):
49 """Makes a figure displaying the pixels flagged as CLIPPED for a whole
50 tract."""
52 propagateData = True
53 parameterizedBand = False
55 def setDefaults(self):
56 super().setDefaults()
58 self.prep.keysToLoad = ["mask"]
59 self.produce.plot = WholeTractImage()
60 self.produce.plot.component = "mask"
61 self.produce.plot.bitmaskPlanes = ["CLIPPED"]
62 self.produce.plot.interval = MinMax()
63 self.produce.plot.stretch = Linear()
66class WholeTractPostageStampTool(AnalysisTool):
67 """Makes a postage-stamp figure displaying all coadd images covering a
68 whole tract."""
70 propagateData = True
71 parameterizedBand = False
73 def setDefaults(self):
74 super().setDefaults()
76 self.prep.keysToLoad = ["image"]
77 self.produce.plot = WholeTractImage()
78 self.produce.plot.displayAsPostageStamp = True
81class WholeTractNImageTool(AnalysisTool):
83 propagateData = True
84 parameterizedBand = False
86 def setDefaults(self):
87 super().setDefaults()
89 self.produce.plot = WholeTractImage()
90 self.produce.plot.interval = MinMax
91 self.produce.plot.stretch = Linear()
92 self.produce.plot.showColorbar = True
93 self.produce.plot.zAxisLabel = "Number of input images"
94 self.produce.plot.colorbarCmap = "viridis"
95 self.produce.plot.noDataColor = "white"
96 self.produce.plot.noDataValue = 0
97 self.produce.plot.vmaxFloor = 10