iso_to_stare_timestrings#
- iso_to_stare_timestrings(iso_strings, forward_res, reverse_res, stare_type)#
Converts an ISO 8601 timestring to a STARE timestring.
The ISO 8601 timestring has to contain exactly 3 digits for milliseconds but no timezone. I.e. it is of the form “%Y-%m-%dT%H:%M:%S.%ms” The stare timestring is of the form “%Y-%m-%dT%H:%M:%S.%ms (f_res, b_res) (stare_type)”
- Parameters:
- iso_strings: array-like of iso timestrings
iso 8601 timestring
- forward_res: int. Valid range is 0..48
The forward resolution (c.f
coarsest_resolution_finer_or_equal_ms())- reverse_res: int. Valid range is 0..48
The reverse resolution (c.f.
coarsest_resolution_finer_or_equal_ms()- stare_type: int
#TODO what is the stare_type?
- Returns:
- stare_strings: list of strings
list of STARE timestrings
Examples
>>> iso_timestring = ['2021-01-09T17:47:56.154564'] >>> pystare.iso_to_stare_timestrings(iso_timestring, forward_res=45, reverse_res=12, stare_type=1) ['2021-01-09T17:47:56.154 (45 12) (1)']