def obliquity(jd, algorithm=2006):
 T = ((jd - jd2000) / 36525.0)
 if (algorithm == 2006):
  p = ((-4.34e-08), (-5.76e-07), 0.0020034, (-0.0001831), (-46.836769), 84381.406)
  corr = 0
 elif (algorithm == 2000):
  p = (0.001813, (-0.00059), (-46.815), 84381.448)
  corr = ((-0.02524) * T)
 elif (algorithm == 1980):
  p = (0.001813, (-0.00059), (-46.815), 84381.448)
  corr = 0
 else:
  raise ValueError(u'invalid algorithm year for computing obliquity')
 return ((np.polyval(p, T) + corr) / 3600.0)

def obliquity ( jd , algorithm = 2006 ) : T = ( ( jd - jd2000 ) / 36525.0 ) if ( algorithm == 2006 ) : p = ( ( - 4.34e-08 ) , ( - 5.76e-07 ) , 0.0020034 , ( - 0.0001831 ) , ( - 46.836769 ) , 84381.406 ) corr = 0 elif ( algorithm == 2000 ) : p = ( 0.001813 , ( - 0.00059 ) , ( - 46.815 ) , 84381.448 ) corr = ( ( - 0.02524 ) * T ) elif ( algorithm == 1980 ) : p = ( 0.001813 , ( - 0.00059 ) , ( - 46.815 ) , 84381.448 ) corr = 0 else : raise ValueError ( u'invalid algorithm year for computing obliquity' ) return ( ( np . polyval ( p , T ) + corr ) / 3600.0 )
computes the obliquity of the earth at the requested julian date .