Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-9111 Add rotator information to HSC VisitInfo #37

Merged
merged 1 commit into from
Mar 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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