CDFAstropy
- class cdflib.epochs_astropy.CDFAstropy[source][source]
Bases:
object
Class to encapsulate astropy time routines with CDF class.
Attributes Summary
Methods Summary
breakdown
(epochs)breakdown_epoch
(epochs)breakdown_epoch16
(epochs)breakdown_tt2000
(tt2000)compute
(datetimes)convert_to_astropy
(epochs[, format])Convert CDF epochs to astropy time objects.
encode
(epochs[, iso_8601])findepochrange
(epochs[, starttime, endtime])parse
(value)Parses the provided date/time string(s) into CDF epoch value(s).
to_datetime
(cdf_time)unixtime
(cdf_time)Encodes the epoch(s) into seconds after 1970-01-01.
Attributes Documentation
Methods Documentation
- static convert_to_astropy(epochs, format=None)[source][source]
Convert CDF epochs to astropy time objects.
- static findepochrange(epochs, starttime=None, endtime=None)[source][source]
- Parameters:
epochs (Time | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
starttime (_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None)
endtime (_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None)
- Return type:
- static parse(value)[source][source]
Parses the provided date/time string(s) into CDF epoch value(s).
- For CDF_EPOCH:
‘yyyy-mm-dd hh:mm:ss.xxx’ (in iso_8601). The string is the output from encode function.
- For CDF_EPOCH16:
The string has to be in the form of ‘yyyy-mm-dd hh:mm:ss.mmmuuunnnppp’ (in iso_8601). The string is the output from encode function.
- For TT2000:
The string has to be in the form of ‘yyyy-mm-dd hh:mm:ss.mmmuuunnn’ (in iso_8601). The string is the output from encode function.