Skip to content

Commit

Permalink
Update VisitInfo boresightRotAngle
Browse files Browse the repository at this point in the history
Matches new clarified definition that boresightRotAngle is
position angle of focal plane +Y measured from N through E.
Implies boresightRotAngle = -ROTANG.
  • Loading branch information
jmeyers314 committed Mar 16, 2017
1 parent 6eae845 commit c2ae592
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions python/lsst/obs/lsstSim/makeLsstSimRawVisitInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ class MakeLsstSimRawVisitInfo(MakeRawVisitInfo):
"""Make a VisitInfo from the FITS header of a raw LSST simulated image
The convention for ROTANG is as follows:
at 0 degrees E = +Y CCD = -X Focal Plane, N = +X CCD = +Y Focal Plane: 90 boresightRotAng
at 90 degrees E = -X CCD = -Y Focal Plane, N = +Y CCD = -X Focal Plane: 0 boresightRotAng
at 0 degrees E = +Y CCD = -X Focal Plane, N = +X CCD = +Y Focal Plane: 0 boresightRotAng
at 90 degrees E = -X CCD = -Y Focal Plane, N = +Y CCD = -X Focal Plane: 270 boresightRotAng
So boresightRotAng = 90 - ROTANG
So boresightRotAng = -ROTANG
"""
observatory = Observatory(-70.749417*degrees, -30.244633*degrees, 2663) # long, lat, elev

Expand All @@ -59,7 +59,7 @@ def setArgDict(self, md, argDict):
self.popAngle(md, "DEC_DEG"),
)
argDict["boresightAirmass"] = self.popFloat(md, "AIRMASS")
argDict["boresightRotAngle"] = 90*degrees - self.popAngle(md, "ROTANG")
argDict["boresightRotAngle"] = -self.popAngle(md, "ROTANG")
argDict["rotType"] = RotType.SKY
argDict["observatory"] = self.observatory
argDict["weather"] = Weather(
Expand Down
2 changes: 1 addition & 1 deletion tests/getRaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def setUp(self):
self.boresightRaDec = IcrsCoord(359.936019771151*degrees, -2.3356222648145*degrees)
self.boresightAzAlt = Coord(127.158246182602*degrees, (90 - 40.6736117075876)*degrees)
self.boresightAirmass = 1.31849492005496
self.boresightRotAngle = (90 - 3.43228)*degrees
self.boresightRotAngle = -3.43228*degrees
self.rotType = RotType.SKY
self.obs_longitude = -70.749417*degrees
self.obs_latitude = -30.244633*degrees
Expand Down
3 changes: 2 additions & 1 deletion tests/testGetEimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def test_getBoresightRaDec(self):
self.assertEqual(coord, self.visit_info.getBoresightRaDec())

def test_getBoresightRotAngle(self):
angle = afwGeom.Angle(-2.565348674005548, afwGeom.radians)
# Note test eimage header has ROTANG=236.983652. boresightRotAngle is -ROTANG.
angle = afwGeom.Angle(-236.983652, afwGeom.degrees)
self.assertAnglesNearlyEqual(angle, self.visit_info.getBoresightRotAngle())

def test_getDarkTime(self):
Expand Down

0 comments on commit c2ae592

Please sign in to comment.