pyacs.lib.astrotime.dayno2decyear
Convert day of year and year to decimal year.
- pyacs.lib.astrotime.dayno2decyear.dayno2decyear(dayno, year, ut=0.5)[source]
Convert day of year and year to decimal year.
- Parameters:
dayno (int or array-like) – Day of year.
year (int or array-like) – Year.
ut (float, optional) – Day fraction. Default 0.5 (12:00).
- Returns:
Decimal year.
- Return type:
float or ndarray
Notes
Accounts for leap years (366 days). Unless ut is specified, the result is at 12:00 (ut=0.5).
Examples
>>> import pyacs >>> pyacs.dayno2decyear(60,1999) >>> 1999.16301369863 >>> pyacs.dayno2decyear(60,2000) >>> 2000.1625683060108 >>> pyacs.dayno2decyear(60,2001) >>> 2001.16301369863 >>> pyacs.dayno2decyear(60,2001,ut=0.) >>> 2001.1616438356164