Exemplo n.º 1
0
 def set_pointing(self, az=0, alt=n.pi/2, twist=0):
     """Set the antenna beam to point at (az, alt) with specified
     right-hand twist to polarizations.  Polarization y is assumed
     to be +pi/2 azimuth from pol x."""
     y, z = n.array([0,1,0]), n.array([0,0,1])
     # Twist is negative b/c we apply it to the coords, not the beam
     rot = coord.rot_m(-twist, z)
     rot = n.dot(rot, coord.rot_m(alt-n.pi/2, y))
     rot = n.dot(rot, coord.rot_m(-az, z))
     self.rot_pol_x = rot
     self.rot_pol_y = n.dot(coord.rot_m(-n.pi/2, z), rot)
Exemplo n.º 2
0
Arquivo: amp.py Projeto: zakiali/aipy
 def set_pointing(self, az=0, alt=np.pi/2, twist=0):
     """Set the antenna beam to point at (az, alt) with specified
     right-hand twist to polarizations.  Polarization y is assumed
     to be +pi/2 azimuth from pol x."""
     y, z = np.array([0,1,0]), np.array([0,0,1])
     # Twist is negative b/c we apply it to the coords, not the beam
     rot = coord.rot_m(-twist, z)
     rot = np.dot(rot, coord.rot_m(alt-np.pi/2, y))
     # NOTE the az, alt definition, az (clockwise around z = up, 0 at x axis = north), alt (from horizon), see also coord.azalt2top
     # rot = np.dot(rot, coord.rot_m(-az, z))
     rot = np.dot(rot, coord.rot_m(-(np.pi/2 - az), z))
     self.rot_pol_x = rot
     self.rot_pol_y = np.dot(coord.rot_m(-np.pi/2, z), rot)
Exemplo n.º 3
0
 def set_ephemtime(self, t=None):
     """Set current time as derived from the ephem package.  Recalculates
     matrix for projecting baselines into current positions."""
     if t is None: t = ephem.now()
     self.date, self.epoch = t, t
     self._eq2now = coord.rot_m(-self.sidereal_time(), n.array([0., 0.,
                                                                1.]))
Exemplo n.º 4
0
 def set_ephemtime(self, t=None):
     """Set current time as derived from the ephem package.  Recalculates
     matrix for projecting baselines into current positions."""
     if t is None: t = ephem.now()
     self.date, self.epoch = t, t
     self._eq2now = coord.rot_m(-self.sidereal_time(), n.array([0.,0.,1.]))