pytuflow.INFO

pytuflow.INFO#

class INFO(fpath)#

Bases: TimeSeries

Class for reading TUFLOW info time series results (.info). These are text files with a .info extension (typically found in the 1D output folder and ending with _1d.info and not .2dm.info) that are output by the 2013 TUFLOW release. The format is similar to the TPC format, however does not include 2d_po or Reporting Location (0d_rl) results.

The INFO class will only load basic properties on initialisation. These are typically properties that are easy to obtain from the file without having to load any of the time-series results. Once a method requiring more detailed information is called, the full results will be loaded. This makes the INFO class very cheap to initialise.

Parameters:

fpath (PathLike) – The path to the output (.info) file.

Raises:

ResultTypeError – Raises pytuflow.results.ResultTypeError if the file does not look like a time series INFO file.

Examples

Load a .info file:

>>> from pytuflow import INFO
>>> res = INFO('path/to/file.info')

Querying all the available data types:

>>> res.data_types()
['water level', 'flow', 'velocity']

Querying all the available 1D channel IDs

>>> res.ids('channel')
['FC01.1_R', 'FC01.2_R', 'FC04.1_C']

Extracting the time-series information for a given channel and data type:

>>> res.time_series('FC01.1_R', 'flow')
time      channel/flow/FC01.1_R
0.000000                  0.000
0.016667                  0.000
0.033333                  0.000
0.050000                  0.000
0.066667                  0.000
...                         ...
2.933333                  3.806
2.950000                  3.600
2.966667                  3.400
2.983334                  3.214
3.000000                  3.038

For more examples, see the documentation for the individual methods.

__init__(fpath)#
Parameters:

fpath (Path | str)

Methods

curtain

Not supported for INFO results.

data_types

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

ids

Returns all the available IDs for the given filter.

maximum

Returns a DataFrame containing the maximum values for the given data types.

profile

Not supported for INFO results.

section

Returns a long plot for the given location and data types at the given time.

time_series

Returns a time-series DataFrame for the given location(s) and data type(s).

times

Returns all the available times for the given filter.

Attributes

ATTRIBUTE_TYPES

DOMAIN_TYPES

GEOMETRY_TYPES

ID_COLUMNS

fpath

The path to the source output file.

units

The unit system used in the output file.

oned_objs

Information on all 1D output objects.

node_count

Number of nodes

channel_count

Number of channels

name

The result name

reference_time

The reference time for the output