PyTuflow: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 30:
|''list'' Channel IDs
|-
|rowspan='1'|<b>[[#channelCount|channelCount]] (</b> ''str'' Node ID <b>)</b>
|rowspan='1'|Returns the total number of channels in results
|''int'' Count
Line 250:
for chan in conn_chans:
print(chan)
else:
# did not load correctly, print error message to console
print(message)
</pre>
 
==channelCount==
 
<b>channelCount (</b> ''str'' Node ID <b>)</b><br>
Returns the total number of channels in results<br>
;Parameters:
:
;Returns:
: '''Count:''' ''int''
:: Number of channels
'''Example'''
<pre>
import pytuflow as tu
 
# Initialise result class
res = tu.ResData()
 
# load .tpc result file
path = r'C:\TUFLOW\results\M04_5m_001.tpc'
err, message = res.load(path)
 
# check results were loaded successfully before calling function
if not err:
chan_count = res.channelCount()
# print to console
print('{0} channels in results'.format(chan_count))
else:
# did not load correctly, print error message to console