galpy.util.coords.radec_to_custom

galpy.util.coords.radec_to_custom(ra, dec, T=None, degree=False)[source]

NAME:

radec_to_custom

PURPOSE:

transform from equatorial coordinates to a custom set of sky coordinates

INPUT:

ra - right ascension

dec - declination

T= matrix defining the transformation: new_rect= T dot old_rect, where old_rect = [cos(dec)cos(ra),cos(dec)sin(ra),sin(dec)] and similar for new_rect

degree - (Bool) if True, ra and dec are given in degree and l and b will be as well

OUTPUT:

custom longitude, custom latitude (with longitude -180 to 180)

For vector inputs [:,2]

HISTORY:

2009-11-12 - Written - Bovy (NYU)

2014-06-14 - Re-written w/ numpy functions for speed and w/ decorators for beauty - Bovy (IAS)

2019-03-02 - adjusted angle ranges - Nathaniel (UofT)