Skip to content

Commit

Permalink
Fixup MakeLsstSwimRawVisitInfo to set darkTime
Browse files Browse the repository at this point in the history
Note that humidity is not available
  • Loading branch information
r-owen committed Sep 30, 2016
1 parent ec28922 commit 09c937e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/lsst/obs/lsstSim/makeLsstSimRawVisitInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def setArgDict(self, md, argDict):
@param[in,out] argdict a dict of arguments
"""
MakeRawVisitInfo.setArgDict(self, md, argDict)
argDict["darkTime"] = self.popFloat(md, "DARKTIME")
argDict["boresightAzAlt"] = Coord(
self.popAngle(md, "AZIMUTH"),
self.altitudeFromZenithDistance(self.popAngle(md, "ZENITH")),
Expand Down
2 changes: 2 additions & 0 deletions tests/getRaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class GetRawTestCase(lsst.utils.tests.TestCase):
def setUp(self):
self.butler = dafPersist.Butler(root=os.path.join(os.path.dirname(__file__), "data"))
self.exposureTime = 15.0
self.darkTime = 15.0
dateObs = DateTime(49552.28496, DateTime.MJD, DateTime.TAI)
self.dateAvg = DateTime(dateObs.nsecs(DateTime.TAI) + int(0.5e9*self.exposureTime), DateTime.TAI)
self.boresightRaDec = IcrsCoord(359.936019771151*degrees, -2.3356222648145*degrees)
Expand Down Expand Up @@ -73,6 +74,7 @@ def testRaw(self):
visitInfo = raw.getInfo().getVisitInfo()
self.assertAlmostEqual(visitInfo.getDate().get(), self.dateAvg.get())
self.assertAlmostEqual(visitInfo.getExposureTime(), self.exposureTime)
self.assertAlmostEqual(visitInfo.getDarkTime(), self.darkTime)
self.assertCoordsNearlyEqual(visitInfo.getBoresightRaDec(), self.boresightRaDec)
self.assertCoordsNearlyEqual(visitInfo.getBoresightAzAlt(), self.boresightAzAlt)
self.assertAlmostEqual(visitInfo.getBoresightAirmass(), self.boresightAirmass)
Expand Down

0 comments on commit 09c937e

Please sign in to comment.