23 __all__ = [
"coordFromVec"]
31 _TinyFloat = numpy.finfo(float).tiny
35 """Convert an ICRS cartesian vector to an ICRS lsst.geom.SpherePoint 39 vec : `list` of `float` 40 An ICRS catesian vector. 41 defRA : `lsst.geom.Angle` or None 42 The RA to use if the vector is too near a pole; 43 ignored if not near a pole. 48 If vec too near a pole and defRA is None. 50 if abs(vec[0]) < _TinyFloat
and abs(vec[1]) < _TinyFloat:
52 raise RuntimeError(
"At pole and defRA==None")
57 return afwGeom.SpherePoint(defRA, decDeg*afwGeom.degrees)
def coordFromVec(vec, defRA=None)