diff -ur NOVAS_Py-3.1.orig/compat/compat.py NOVAS_Py-3.1/compat/compat.py
old
|
new
|
|
3057 | 3057 | limb_ang = c_double() |
3058 | 3058 | nadir_ang = c_double() |
3059 | 3059 | |
3060 | | _limb_angle = ((c_double*3)(*pos_obj), (c_double*3)(*pos_obs), |
| 3060 | _limb_angle ((c_double*3)(*pos_obj), (c_double*3)(*pos_obs), |
3061 | 3061 | byref(limb_ang), byref(nadir_ang)) |
3062 | 3062 | |
3063 | 3063 | return limb_ang.value, nadir_ang.value |
… |
… |
|
3160 | 3160 | |
3161 | 3161 | return jd |
3162 | 3162 | |
3163 | | def cal_date(day): |
| 3163 | def cal_date(jd): |
3164 | 3164 | """ |
3165 | 3165 | Return the Gregorian date for a given Julian day. |
3166 | 3166 | |
… |
… |
|
3184 | 3184 | |
3185 | 3185 | """ |
3186 | 3186 | |
3187 | | if day < 0.0: raise ValueError(_neg_err % {'name': 'day'}) |
| 3187 | if jd < 0.0: raise ValueError(_neg_err % {'name': 'jd'}) |
3188 | 3188 | |
3189 | 3189 | _cal_date = novaslib.cal_date |
3190 | 3190 | _cal_date.argtypes = (c_double, POINTER(c_short), POINTER(c_short), |
… |
… |
|
3196 | 3196 | day = c_short() |
3197 | 3197 | hour = c_double() |
3198 | 3198 | |
3199 | | _cal_date(day, byref(year), byref(month), byref(day), byref(hour)) |
| 3199 | _cal_date(jd, byref(year), byref(month), byref(day), byref(hour)) |
3200 | 3200 | |
3201 | 3201 | return year.value, month.value, day.value, hour.value |
3202 | 3202 | |