pyacs.lib.astrotime.cal2decyear

Convert a calendar date to decimal year.

pyacs.lib.astrotime.cal2decyear.cal2decyear(day, month, year, ut=0.5)[source]

Convert a calendar date to decimal year.

Parameters:
  • day (int or array-like) – Day of month.

  • month (int or array-like) – Month (1-12).

  • year (int or array-like) – Year.

  • ut (float, optional) – Day fraction in [0., 1.[. Default 0.5 (middle of day).

Returns:

Decimal year.

Return type:

float or ndarray

Notes

When ut is not provided, the middle of the day is used.