pytuflow.TPC.times

Contents

pytuflow.TPC.times#

TPC.times(filter_by=None, fmt='relative')#

Returns all the available times for the output.

The filter_by is an optional input that can be used to filter the return further. Valid filters for the TPC results are:

Domain filters:

  • 1d: 1D result times - nodes and channels will always have the same times

  • node - times for node types (note, there will be no difference between nodes and channels)

  • channel - times for channel types (note, there will be no difference between nodes and channels)

  • 2d (or ``po): 2D result times - 2D results can have varying times between result types and locations. This will return all unique times

  • rl (or 0d): Reporting locations result times. RL results will have the same times for all RL types

Data type filters:

  • [data type]: The data type to filter the times by. This will return all times for the given data type.

Location filters:

  • [location]: The location to filter the times by. This will return all times for the given location.

Combine filters:

  • [filter1]/[filter2]/...: (use / to delim).

Parameters:
  • filter_by (str, optional) – The string to filter the times by.

  • fmt (str, optional) – The format for the times. Options are ‘relative’ or ‘absolute’.

Returns:

The available times in the requested format.

Return type:

list[TimeLike]

Examples

>>> res = TPC('/path/to/result.tpc')
>>> res.times()
[0.0, 0.016666666666666666, ..., 3.0]
>>> res.times(fmt='absolute')
[Timestamp('2021-01-01 00:00:00'), Timestamp('2021-01-01 00:01:00'), ..., Timestamp('2021-01-01 03:00:00')]