pytuflow.INFO.ids

Contents

pytuflow.INFO.ids#

INFO.ids(filter_by=None)#

Returns all the available IDs for the given filter.

The filter_by argument can be used to add a filter to the returned IDs. Available filters for the INFO class are:

  • None: default - returns all timeseries IDs

  • 1d: same as None as class only contains 1D data

  • node

  • channel

  • timeseries: returns only IDs that have time series data.

  • section: returns only IDs that have section data (i.e. long plot data).

  • [data_type]: returns only IDs for the given data type. Shorthand data type names can be used.

Parameters:

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

Returns:

The available IDs.

Return type:

list[str]

Examples

The below examples demonstrate how to use the filter_by argument to filter the returned IDs. The first example returns all IDs:

>>> res = ...  # Assume res is loaded result class
>>> res.ids()
['FC01.1_R', 'FC01.2_R', 'FC04.1_C', 'FC01.1_R.1', 'FC01.1_R.2', 'FC01.2_R.1', 'FC01.2_R.2', 'FC04.1_C.1', 'FC04.1_C.2']

Return only node IDs:

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

Return IDs that have water level results:

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