ch_ephem.time

CHIME ephemeris time routines.

Time Functions

Functions

chime_local_datetime(*args)

Create a datetime.datetime object in Canada/Pacific timezone.

parse_date(datestring)

Convert date string to a datetime object.

utc_lst_to_mjd(datestring, lst[, obs])

Convert date string and LST to corresponding modified Julian Day.

ch_ephem.time.chime_local_datetime(*args: Any) datetime[source]

Create a datetime.datetime object in Canada/Pacific timezone.

Parameters:

*args – Any valid arguments to the constructor of datetime.datetime except tzinfo. Local date and time at CHIME.

Returns:

dt – Timezone naive date and time but converted to UTC.

Return type:

datetime.datetime

ch_ephem.time.parse_date(datestring: str) datetime[source]

Convert date string to a datetime object.

Parameters:

datestring (str) – Date as YYYYMMDD-AAA, where AAA is one of [UTC, EST, EDT, PST, PDT]

Returns:

date – A python datetime object in UTC.

Return type:

datetime.datetime

ch_ephem.time.utc_lst_to_mjd(datestring: str, lst: float, obs: Observer | None = None) float[source]

Convert date string and LST to corresponding modified Julian Day.

Parameters:
  • datestring (str) – Date. The string is parsed using parse_date (q.v.).

  • lst (float) – Local sidereal time at the observer in decimal hours

  • obs (caput.time.Observer or None) – The observer. If not given, or None, the CHIME instrument will be used.

Returns:

mjd – Modified Julian Date corresponding to the given time.

Return type:

float