pystare.temporal#

adapt_resolutions_shape(tivs, resolutions)

analyze_iso8601_string(iso_string)

Returns 'has_tz' if timestring contains timezone Returns 'no_ms' if timestring does not contain milliseconds Returns 'nat' if timestring is not a ISO8601 timestring Returns 'good' if timestring contains ms but no tz

bitmask(start_stop)

cmp_temporal(tivs1, tivs2[, flatten])

Intersects tests between temporal index values.

coarsen(indices, reverse_increments, ...)

TODO: Not tested

coarsest_resolution_finer_or_equal_ms(ms)

Converts milliseconds to finer or equal STARE temporal resolution.

expanded_tiv(tiv)

Construct the three tivs associated with a tiv neighborhood.

expanded_tiv_to_string(tiv)

Format the three tivs associated with a tiv neighborhood.

force_3ms(timestamp)

Forces 3 digits for the millisecods in an ISO timestamp.

format_expanded_tiv(tiv)

Format the triple-tivs associated with a tiv neighborhood.

format_tiv(tiv)

format_tpod(tiv_res[, s])

Return a formatted tpod string from a tpod tuple.

forward_resolution(indices)

Retrieve the forward resolution

from_iso_strings(iso_strings[, forward_res, ...])

Converts an iso strings to STARE temporal index values

from_julian_date(jd1, jd2, scale[, ...])

Converts two-part Julian Dates (JD) to SIVs.

from_ms_since_epoch_utc(ms_since_epoch_utc)

Converts an integer of milliseconds since unix epoch in UTC to TIV.

from_stare_timestrings(stare_timestrings[, ...])

Converts a STARE timestring to a STARE temporal index value The stare timestring is of the form "%Y-%m-%dT%H:%M:%S.%ms (f_res, b_res) (stare_type)

from_temporal_triple(triple[, include_bounds])

Calculate a temporal index value from a low, middle, and high tiv.

from_utc_variable(datetime, ...)

This function takes an array of datetimes and constructs temporal index values from them with forward and reverse resolutions as given in the arrays passed in.

hex16(i)

iso_to_stare_timestrings(iso_strings, ...)

Converts an ISO 8601 timestring to a STARE timestring.

lower_bound_ms(tiv)

TODO

lower_bound_tai(tiv)

TODO

make_tpod_tuple(tiv, resolution)

Make a tpod tuple of form (tiv_start,resolution).

milliseconds_at_resolution(resolution)

Returns milliseconds for a given resolution.

now([forward_resolution, reverse_resolution])

Get a tiv representing current point in time.

parse_formatted_tpod(tpod_string[, s])

Parse a formatted tpod string and return a tpod tuple.

pods_in_query(tiv, pod_resolution)

Return a list of pod-tuples contained in the query.

reverse_resolution(indices)

Retrieve the reverse resolution

set_forward_resolution(tivs, resolutions)

Set the forward resolution of STARE temporal index values

set_reverse_resolution(tivs, resolutions)

Set the reverse resolution of STARE temporal index values

set_temporal_resolutions_from_sorted(...[, ...])

TODO

temporal_contains_instant(indices1, indices2)

Test if indices1 contain the instants in indices2.

temporal_overlap(indices1, indices2)

Test for overlap, element by element.

temporal_overlap_tai(indices1, indices2)

Test for overlap, element by element.

temporal_value_intersection_if_overlap(...)

Calculate intersection temporal index value element-by-element if they overlap.

temporal_value_union_if_overlap(indices1, ...)

Calculate union temporal index value element-by-element if they overlap.

tiv_from_datetime(datetime_object[, ...])

tiv_from_datetime2(dts)

Return a tiv spanning 2 datetimes in dts.

tiv_from_string(s[, forward_resolution, ...])

Example: tiv_from_string('1999-05-05T12:00:00.999')

tiv_from_string2(slist)

Example: tiv_from_string(['1999-05-05T12:00:00.999', '1999-05-06T12:00:00.999'])

tiv_from_tiv2(tivs)

tiv_utc_to_string(tivs)

to_julian_date(tivs, scale)

Converts STARE temporal index values to two-part Julian Dates

to_ms_since_epoch_utc(tivs)

Converts TIVs into milliseconds since epoch in UTC

to_stare_timestring(tivs[, scale])

Converts a STARE temporal index value to a STARE timestring

to_temporal_triple_ms(tiv)

to_temporal_triple_tai(tiv)

tpod_terminator(tpod)

Return a terminator for a tpod tuple.

upper_bound_ms(tiv)

TODO

upper_bound_tai(tiv)

TODO

validate_iso8601_string(iso_string[, ...])

Test if string is ISO 8601 timestring.

validate_iso8601_strings(time_strings[, ...])

Validate if collection of strings all are ISO8601.

validate_stare_timestring(timestrings)

Tests if timestring has shape of STARE timestring,

validate_stare_timestrings(timestrings)

Validate if collection of strings are STARE timestrings.