Coverage for python/lsst/sims/catUtils/mixins/PhoSimSupport.py : 95%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Parameters ---------- ra0, dec0 are the coordinates of the original field center in radians
ra1, dec1 are the coordinates of the new field center in radians
The transform() method of this class operates by first applying a rotation that carries the original field center into the new field center. Points are then transformed into a basis in which the unit vector defining the new field center is the x-axis. A rotation about the x-axis is applied so that a point that was due north of the original field center is still due north of the field center at the new location. Finally, points are transformed back into the original x,y,z bases. """
# find the rotation that carries the original field center # to the new field center self._transformation = np.identity(3, dtype=float) return
# create a basis set in which the unit vector # defining the new field center is the x axis
yy, zz])
# Take a point due north of the original field # center. Apply first_rotation to carry it to # the new field. Transform it to the [xx, yy, zz] # bases and find the rotation about xx that will # make it due north of the new field center. # Finally, transform back to the original bases.
#print(np.degrees(sphericalFromCartesian(north)))
s*north[0]+c*north[1]])
[0.0, c, -s], [0.0, s, c]])
np.dot(yz_rotation, to_self_bases))
first_rotation)
""" ra, dec are in radians; return the RA, Dec coordinates of the point about the new field center """ |