yearFraction

Return to directory of Todd's CASA extensions

Gets the fractional year for a specified date string. See also doyFromDate.

Usage:

au.yearFraction(date='')
Inputs:
  • date format: 2011/10/15 05:00:00 or 2011/10/15-05:00:00 or 2011-10-15 05:00:00 or 2011-10-15-05:00:00 or 2011-10-15T05:00:00 or 2011-Oct-15 etc. The time portion is optional.
Returns:
  • floating point epoch
  • Note: returns 2000.000 for 2000/01/01 12:00:00 UT as per definition

Examples:

CASA <2>: au.yearFraction()
  Out[2]: 2016.1542776323113
CASA <3>: au.yearFraction('2012/01/1 12:00:00')
  Out[3]: 2012.0

-- ToddHunter - 2016-02-26
Topic revision: r1 - 2016-02-26, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback