Coverage for python/lsst/analysis/tools/analysisMetrics/analysisMetrics.py: 60%

30 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2022-11-25 03:15 -0800

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 

22 

23__all__ = ( 

24 "WPerpPSFMetric", 

25 "WPerpCModelMetric", 

26 "XPerpPSFMetric", 

27 "XPerpCModelMetric", 

28 "YPerpPSFMetric", 

29 "YPerpCModelMetric", 

30) 

31 

32from ..analysisParts.stellarLocus import WPerpCModel, WPerpPSF, XPerpCModel, XPerpPSF, YPerpCModel, YPerpPSF 

33from ..interfaces import AnalysisMetric 

34 

35 

36class WPerpPSFMetric(WPerpPSF, AnalysisMetric): 

37 parameterizedBand: bool = False 

38 

39 def setDefaults(self): 

40 super().setDefaults() 

41 

42 self.produce.units = { # type: ignore 

43 "wPerp_psfFlux_sigmaMAD": "mmag", 

44 "wPerp_psfFlux_median": "mmag", 

45 } 

46 

47 

48class WPerpCModelMetric(WPerpCModel, AnalysisMetric): 

49 def setDefaults(self): 

50 super().setDefaults() 

51 

52 self.produce.units = { # type: ignore 

53 "wPerp_cmodelFlux_sigmaMAD": "mmag", 

54 "wPerp_cmodelFlux_median": "mmag", 

55 } 

56 

57 

58class XPerpPSFMetric(XPerpPSF, AnalysisMetric): 

59 parameterizedBand: bool = False 

60 

61 def setDefaults(self): 

62 super().setDefaults() 

63 

64 self.produce.units = { # type: ignore 

65 "xPerp_psfFlux_sigmaMAD": "mmag", 

66 "xPerp_psfFlux_median": "mmag", 

67 } 

68 

69 

70class XPerpCModelMetric(XPerpCModel, AnalysisMetric): 

71 def setDefaults(self): 

72 super().setDefaults() 

73 

74 self.produce.units = { # type: ignore 

75 "xPerp_cmodelFlux_sigmaMAD": "mmag", 

76 "xPerp_cmodelFlux_median": "mmag", 

77 } 

78 

79 

80class YPerpPSFMetric(YPerpPSF, AnalysisMetric): 

81 def setDefaults(self): 

82 super().setDefaults() 

83 

84 self.produce.units = { # type: ignore 

85 "yPerp_psfFlux_sigmaMAD": "mmag", 

86 "yPerp_psfFlux_median": "mmag", 

87 } 

88 

89 

90class YPerpCModelMetric(YPerpCModel, AnalysisMetric): 

91 def setDefaults(self): 

92 super().setDefaults() 

93 

94 self.produce.units = { # type: ignore 

95 "yPerp_cmodelFlux_sigmaMAD": "mmag", 

96 "yPerp_cmodelFlux_median": "mmag", 

97 }