pytuflow.FMTS.ids#
- FMTS.ids(filter_by=None)#
Returns all the available IDs for the given filter. By default, only IDs that contain results are returned. The returned IDs are also returned as just their name e.g.
FC01.1_R
rather than the full ID e.g.CONDUIT_CIRCULAR_FC01.1_R
.The
filter_by
argument can be used to add a filter to the returned IDs. Available filters for theFMTS
class are:None
: default - returns alltimeseries
IDs (i.e. IDs that contain results).1d
: same asNone
as class only contains 1D datanode
- returns all nodes/units regardless of whether they contain results. The full ID is also returned in case there are duplicate names. Only applicable if aDAT
orGXY
file is provided.channel
- returns all channel IDs. Channel IDs are not returned by when usingNone
as they don’t contain any result data. Only applicable if aDAT
orGXY
file is provided.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
>>> res = FMTS('path/to/result.zzn', dat='path/to/result.dat', gxy='path/to/result.gxy') >>> res.ids() ['FC01.36', 'FC01.35', 'FC01.351cu',... 'FC02', 'ds2_S', 'FC01'] >>> res.ids('node') ['QTBDY__FC01', 'JUNCTION_OPEN_FC01', 'RIVER_SECTION_FC01.40',... 'JUNCTION_OPEN_ds2', 'SPILL__ds2_S']