pyacs.lib.astrotime.cal2mjd.cal2mjd
- pyacs.lib.astrotime.cal2mjd.cal2mjd(day, month, year, ut=0.5)[source]
Convert a calendar date (universal time) to modified Julian day (JD-2400000.5).
- 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:
Modified Julian day.
- Return type:
float or ndarray
Notes
When ut is not provided, the middle of the day is used.
Examples
>>> import pyacs >>> pyacs.cal2mjd(29,2,2000) >>> 51603.5 >>> pyacs.cal2mjd(29,2,2000,ut=0.0) >>> 51603.0