lsst.afw g7304ef7ade+559a34a84e
Loading...
Searching...
No Matches
_visitInfo.py
Go to the documentation of this file.
1# This file is part of afw.
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/>.
21"""This file only exists to deprecate the Filter and FilterProperty classes.
22"""
23
24from lsst.utils.deprecated import deprecate_pybind11
25from lsst.utils import continueClass
26from ._imageLib import VisitInfo
27
28
29__all__ = []
30
31
32@continueClass
33class VisitInfo: # noqa: F811
35 self,
36 exposureId=None,
37 exposureTime=None,
38 darkTime=None,
39 date=None,
40 ut1=None,
41 era=None,
42 boresightRaDec=None,
43 boresightAzAlt=None,
44 boresightAirmass=None,
45 boresightRotAngle=None,
46 rotType=None,
47 observatory=None,
48 weather=None,
49 instrumentLabel=None,
50 id=None,
51 focusZ=None,
52 observationType=None,
53 scienceProgram=None,
54 observationReason=None,
55 object=None,
56 hasSimulatedContent=None,
57 ):
58 if exposureId is None:
59 # Note: exposureId is deprecated and `VisitInfo` no longer contains
60 # an `exposureId` property, so we use the getter until
61 # this is removed in DM-32138.
62 exposureId = self.getExposureId()
63 if exposureTime is None:
64 exposureTime = self.exposureTime
65 if darkTime is None:
66 darkTime = self.darkTime
67 if date is None:
68 date = self.date
69 if ut1 is None:
70 ut1 = self.ut1
71 if era is None:
72 era = self.era
73 if boresightRaDec is None:
74 boresightRaDec = self.boresightRaDec
75 if boresightAzAlt is None:
76 boresightAzAlt = self.boresightAzAlt
77 if boresightAirmass is None:
78 boresightAirmass = self.boresightAirmass
79 if boresightRotAngle is None:
80 boresightRotAngle = self.boresightRotAngle
81 if rotType is None:
82 rotType = self.rotType
83 if observatory is None:
84 observatory = self.observatory
85 if weather is None:
86 weather = self.weather
87 if instrumentLabel is None:
88 instrumentLabel = self.instrumentLabel
89 if id is None:
90 id = self.id
91 if focusZ is None:
92 focusZ = self.focusZ
93 if observationType is None:
94 observationType = self.observationType
95 if scienceProgram is None:
96 scienceProgram = self.scienceProgram
97 if observationReason is None:
98 observationReason = self.observationReason
99 if object is None:
100 object = self.object
101 if hasSimulatedContent is None:
102 hasSimulatedContent = self.hasSimulatedContent
103
104 return VisitInfo(
105 exposureId=exposureId,
106 exposureTime=exposureTime,
107 darkTime=darkTime,
108 date=date,
109 ut1=ut1,
110 era=era,
111 boresightRaDec=boresightRaDec,
112 boresightAzAlt=boresightAzAlt,
113 boresightAirmass=boresightAirmass,
114 boresightRotAngle=boresightRotAngle,
115 rotType=rotType,
116 observatory=observatory,
117 weather=weather,
118 instrumentLabel=instrumentLabel,
119 id=id,
120 focusZ=focusZ,
121 observationType=observationType,
122 scienceProgram=scienceProgram,
123 observationReason=observationReason,
124 object=object,
125 hasSimulatedContent=hasSimulatedContent,
126 )
127
128
129VisitInfo.getExposureId = deprecate_pybind11(
130 VisitInfo.getExposureId,
131 reason="Replaced by VisitInfo.id for full focal plane identifiers and by ExposureInfo.id for "
132 "detector-level identifiers. Will be removed after v25.",
133 version="v24.0")
def copyWith(self, exposureId=None, exposureTime=None, darkTime=None, date=None, ut1=None, era=None, boresightRaDec=None, boresightAzAlt=None, boresightAirmass=None, boresightRotAngle=None, rotType=None, observatory=None, weather=None, instrumentLabel=None, id=None, focusZ=None, observationType=None, scienceProgram=None, observationReason=None, object=None, hasSimulatedContent=None)
Definition: _visitInfo.py:57