Skip to main content
`Ctrl`+`K`

# TimeJulianEpoch

class astropy.time.TimeJulianEpoch(val1, val2, scale, precision, in_subfmt, out_subfmt, from_jd=False)

  Bases: `TimeEpochDate`

  Julian epoch year as decimal value(s) like 2000.0.

  This format is based the Julian year which is exactly 365.25 days/year and a day is exactly 86400 SI seconds.

  The Julian epoch year is defined so that 2000.0 is 12:00 TT on January 1, 2000. Using astropy this is expressed as:

      >>> from astropy.time import Time
      >>> import astropy.units as u
      >>> j2000_epoch = Time("2000-01-01T12:00:00", scale="tt")
      >>> print(j2000_epoch.jyear)
      2000.0
      >>> print((j2000_epoch + 365.25 * u.day).jyear)
      2001.0

  The Julian year is commonly used in astronomy for expressing the epoch of a source catalog or the time of an observation. The Julian epoch year is sometimes written as a string like “J2001.5” with a preceding “J”. You can initialize a `Time` object with such a string:

      >>> print(Time("J2001.5").jyear)
      2001.5

  See also: https://en.wikipedia.org/wiki/Julian_year_(astronomy).

  Attributes Summary

  `epoch_to_jd` |
  `in_subfmt` |
  `jd1` |
  `jd2` |
  `jd_to_epoch` |
  `name` |
  `out_subfmt` |
  `precision` |
  `scale` | Time scale.
  `subfmts` |
  `unit` |
  `value` | Return time representation from internal jd1 and jd2.

  Methods Summary

  `fill_value`(subfmt) | Return a value corresponding to J2000 (2000-01-01 12:00:00) in this format.
  `set_jds`(val1, val2) | Set internal jd1 and jd2 from val1 and val2.
  `to_value`(**kwargs) | Return time representation from internal jd1 and jd2.

  Attributes Documentation

  epoch_to_jd = 'epj2jd'
  in_subfmt
  jd1
  jd2
  jd_to_epoch = 'epj'
  name = 'jyear'
  out_subfmt
  precision
  scale

    Time scale.

  subfmts = (('float', <class 'numpy.float64'>, None, <ufunc 'add'>), ('long', <class 'numpy.longdouble'>, <function longdouble_to_twoval>, <function twoval_to_longdouble>), ('decimal', <class 'numpy.object_'>, <numpy.vectorize object>, <numpy.vectorize object>), ('str', <class 'numpy.str_'>, <numpy.vectorize object>, <numpy.vectorize object>), ('bytes', <class 'numpy.bytes_'>, <numpy.vectorize object>, <numpy.vectorize object>))
  unit = 365.25
  value

  Methods Documentation

  classmethod fill_value(subfmt)

    Return a value corresponding to J2000 (2000-01-01 12:00:00) in this format.

    This is used as a fill value for masked arrays to ensure that any ERFA operations on the masked array will not fail due to the masked value.

  set_jds(val1, val2)

    Set internal jd1 and jd2 from val1 and val2. Must be provided by derived classes.

  to_value(**kwargs)

    Return time representation from internal jd1 and jd2. Subclasses that require `parent` or to adjust the jds should override this method.