PyTuflow: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
Ellis Symons (talk | contribs) |
Ellis Symons (talk | contribs) No edit summary |
||
| Line 17: | Line 17: | ||
'''Methods''' |
'''Methods''' |
||
{|class="wikitable" style="text-align: |
{|class="wikitable" style="text-align: left;" |
||
! style="background-color:#005581; font-weight:bold; color:white" width=20%| Method |
! style="background-color:#005581; font-weight:bold; color:white" width=20%| Method |
||
|! style="background-color:#005581; font-weight:bold; color:white;" width=30%|Description |
|! style="background-color:#005581; font-weight:bold; color:white;" width=30%|Description |
||
|! style="background-color:#005581; font-weight:bold; color:white;" width= |
|! style="background-color:#005581; font-weight:bold; color:white;" width=25%|Returns |
||
|! style="background-color:#005581; font-weight:bold; color:white;" width=20%|Returns |
|||
|- |
|- |
||
|rowspan='1'|<b>channelConnectionCount</b> |
|rowspan='1' style='text-align: left'|<b>channelConnectionCount (</b> ''str'' Node ID <b>)</b> |
||
|rowspan='1'|Returns the number of channels connected to a given node |
|rowspan='1'|Returns the number of channels connected to a given node |
||
| ⚫ | |||
|str Node ID |
|||
| ⚫ | |||
|- |
|- |
||
|rowspan='1'|<b>channelConnections</b> |
|rowspan='1'|<b>channelConnections (</b> ''str'' Node ID <b>)</b> |
||
|rowspan='1'|Returns a list of the channels connected to a given node |
|rowspan='1'|Returns a list of the channels connected to a given node |
||
| ⚫ | |||
|str Node ID |
|||
|- |
|||
| ⚫ | |||
|rowspan='1'|<b>channelCount (</b> ''str'' Node ID <b>)</b> |
|||
|rowspan='1'|Returns the total number of channels in results |
|||
|''int'' Count |
|||
|- |
|||
|rowspan='1'|<b>channelResultTypes ()</b> |
|||
|rowspan='1'|Returns a list of all the available result types for channels |
|||
|list of Result Types |
|||
|- |
|||
|rowspan='1'|<b>channels ()</b> |
|||
|rowspan='1'|Returns a list of all the channels in the results |
|||
|''list'' Channel IDs |
|||
|- |
|||
|rowspan='1'|<b>channelsDownstream (</b> ''str'' Node ID <b>)</b> |
|||
|rowspan='1'|Returns a list of all the channels downstream of a given node |
|||
|''list'' Channel IDs |
|||
|- |
|||
|rowspan='1'|<b>channelsUpstream (</b> ''str'' Node ID <b>)</b> |
|||
|rowspan='1'|Returns a list of all the channels upstream of a given node |
|||
|''list'' Channel IDs |
|||
|- |
|||
|rowspan='1'|<b>format ()</b> |
|||
|rowspan='1'|Returns the result format i.e. '2013' or '2016' |
|||
|''str'' Format |
|||
|- |
|||
|rowspan='2'|<b>getAdverseGradients ()</b> |
|||
|rowspan='2'|Returns locations of any adverse water level or energy level (if result type available) gradients in long profile. Note getLongProfileData method must be called prior to calling this method |
|||
|Adverse Water Level Gradient Locations ( ''list' x data, ''list'' y data ) |
|||
|- |
|||
|Adverse Energy Level Gradient Locations ( ''list'' x data, ''list'' y data ) |
|||
|- |
|||
|rowspan='4'|<b>getLongProfileData (</b> ''float'' Timestep, ''str'' Result Type, ''str'' Channel ID, '[optional] ''str'' 2nd Channel ID <b>)</b> |
|||
|rowspan='4'|Returns long profile data from a given channel to another channel. If no second channel is specified will continue until no further channels downstream |
|||
|''bool'' Error |
|||
|- |
|||
|''str'' Message |
|||
|- |
|||
|Profile Data ( ''list'' x values, ''list'' y values ) |
|||
|- |
|||
|rowspan='1'|<b>getLongProfileTimeOfMax ()</b> |
|||
|rowspan='1'|Returns the time of maximum water level along the profile. Note getLongProfileData method must be called prior to calling this method |
|||
|Profile Data ( ''list'' x values, ''list'' y values ) |
|||
|- |
|||
|} |
|} |
||
Revision as of 15:56, 8 February 2019
Class: ResData
Class for TUFLOW time series results.
Initialised as an empty object, or with results with a *.tpc in TUFLOW 2016 release and later or *.info in TUFLOW 2013 release.
import pytuflow as tu
res = tu.ResData() # initialising as an empty object
# or
res = tu.ResData('M01_5m_001.tpc') # initialising with results
Methods
| Method | Description | Returns |
|---|---|---|
| channelConnectionCount ( str Node ID ) | Returns the number of channels connected to a given node | int Count |
| channelConnections ( str Node ID ) | Returns a list of the channels connected to a given node | list Channel IDs |
| channelCount ( str Node ID ) | Returns the total number of channels in results | int Count |
| channelResultTypes () | Returns a list of all the available result types for channels | list of Result Types |
| channels () | Returns a list of all the channels in the results | list Channel IDs |
| channelsDownstream ( str Node ID ) | Returns a list of all the channels downstream of a given node | list Channel IDs |
| channelsUpstream ( str Node ID ) | Returns a list of all the channels upstream of a given node | list Channel IDs |
| format () | Returns the result format i.e. '2013' or '2016' | str Format |
| getAdverseGradients () | Returns locations of any adverse water level or energy level (if result type available) gradients in long profile. Note getLongProfileData method must be called prior to calling this method | Adverse Water Level Gradient Locations ( list' x data, list y data ) |
| Adverse Energy Level Gradient Locations ( list x data, list y data ) | ||
| getLongProfileData ( float Timestep, str Result Type, str Channel ID, '[optional] str 2nd Channel ID ) | Returns long profile data from a given channel to another channel. If no second channel is specified will continue until no further channels downstream | bool Error |
| str Message | ||
| Profile Data ( list x values, list y values ) | ||
| getLongProfileTimeOfMax () | Returns the time of maximum water level along the profile. Note getLongProfileData method must be called prior to calling this method | Profile Data ( list x values, list y values ) |