pytuflow.TPC.data_types

Contents

pytuflow.TPC.data_types#

TPC.data_types(filter_by=None)#

Returns all the available data types (result types) for the output given the filter.

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

Domain filters:

  • 1d

  • 2d (or po)

  • rl (or 0d)

Geometry filters:

  • node

  • channel

  • point - (for 2d and rl domains only - use node for 1d domain)

  • line - (for 2d and rl domains only - use channel for 1d domain)

  • polygon (or region)

Location filters:

  • [location]: The location to filter the data_types by.

Combine filters:

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

Parameters:

filter_by (str, optional) – The string to filter the data types by.

Returns:

The available data types.

Return type:

list[str]

Examples

Get the available data types for 1D channel results:

>>> res = TPC('/path/to/result.tpc')
>>> res.data_types('channel')
['flow', 'velocity', 'channel entry losses', 'channel additional losses', 'channel exit losses', 'channel flow regime']

Get the available data types for 2D po and specicially for po line.

>>> res.data_types('po/line')
['depth', 'flow area', 'flow integral', 'flow']

Get the available data types for 2D po and RL (rl) region results.

>>> res.data_types('po/rl/region')
['flow into region', 'flow out of region', 'volume', 'average water level', 'max water level']

The above could also be accomplished with just region (or polygon) since it’s only applicable for po and rl domains.