def get_jd12(time, scale):
 if (time.scale == scale):
  newtime = time
 else:
  try:
   newtime = getattr(time, scale)
  except iers.IERSRangeError as e:
   _warn_iers(e)
   newtime = time
 return (newtime.jd1, newtime.jd2)

def get_jd12 ( time , scale ) : if ( time . scale == scale ) : newtime = time else : try : newtime = getattr ( time , scale ) except iers . IERSRangeError as e : _warn_iers ( e ) newtime = time return ( newtime . jd1 , newtime . jd2 )
gets jd1 and jd2 from a time object in a particular scale .