SCETime#
- class stixcore.time.datetime.SCETime(*args, **kwargs)[source]#
Bases:
SCETBaseSolarOrbiter Spacecraft Elapse Time (SCET) or Onboard Time (OBT).
The mission clock time is compose of a coarse time in seconds in 32bit field and fine time in 16bit field fractions of second 1s/(2**16 -1) can be represented as a single 48bit field or a float.
The top most bit is used to indicate time sync issues.
Examples
SCETimes can be created in a number of ways from scaler values,
>>> SCETime(123, 456) SCETime(coarse=123, fine=456)
combinations of scalers and array-like,
>>> SCETime(123, [1,2,3,4,5]) SCETime(coarse=[123 123 123 123 123], fine=[1 2 3 4 5])
or from seconds with the understanding this are from the epoch of the start or the SCET
>>> SCETime.from_float(123.345*u.s) SCETime(coarse=123, fine=22610)
Attributes Summary
Methods Summary
from_btime(btime)from_float(scet_float)Create an SCETime from a float representation of seconds since epoch
from_string(scet_str[, sep])Create an SCETime for a string representation e.g.
'123456:789'.max_time()The maximum possible time value
min_time()The minimum possible time value
to_datetime([raise_error])Return a python datetime object.
to_string([full, sep])to_time()Attributes Documentation
- fits#
- info#
Methods Documentation
- classmethod from_float(scet_float)[source]#
Create an SCETime from a float representation of seconds since epoch
- Parameters:
scet_float (
astropy.units.Quantity) – The scet float representation- Returns:
SCETime– The SCETime object
- classmethod from_string(scet_str, sep=':')[source]#
Create an SCETime for a string representation e.g.
'123456:789'- Parameters:
scet_str (
array_like) – Time/s in SCET string format- Returns:
SCETime– The SCETime object
- to_datetime(raise_error=False)[source]#
Return a python datetime object.
- Returns:
datetime.datetime– The corresponding UTC datetime object.