1
########################################################################
3
# Vision Network - Python source code - file generated by vision
4
# Monday 16 April 2007 11:55:59
6
# The Scripps Research Institute (TSRI)
7
# Molecular Graphics Lab
8
# La Jolla, CA 92037, USA
10
# Copyright: Daniel Stoffler, Michel Sanner and TSRI
12
# revision: Guillaume Vareille
14
#########################################################################
16
# $Header: /opt/cvs/python/packages/share1.5/Vision/doc/Examples/matplotlib/Quiver_net.py,v 1.3 2007/08/29 20:37:16 vareille Exp $
18
# $Id: Quiver_net.py,v 1.3 2007/08/29 20:37:16 vareille Exp $
21
from traceback import print_exc
22
## loading libraries ##
23
from Vision.matplotlibNodes import matplotliblib
24
masterNet.getEditor().addLibraryInstance(matplotliblib,"Vision.matplotlibNodes", "matplotliblib")
26
from Vision.StandardNodes import stdlib
27
masterNet.getEditor().addLibraryInstance(stdlib,"Vision.StandardNodes", "stdlib")
30
## saving node ReadTable ##
31
from Vision.StandardNodes import ReadTable
32
ReadTable_0 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib)
33
masterNet.addNode(ReadTable_0,37,56)
34
ReadTable_0.inputPortByName['filename'].widget.set("Data/quiver_data_1.dat", run=False)
35
apply(ReadTable_0.configure, (), {'expanded': True})
37
print "WARNING: failed to restore ReadTable named ReadTable in network masterNet"
42
## saving node ReadTable ##
43
from Vision.StandardNodes import ReadTable
44
ReadTable_1 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib)
45
masterNet.addNode(ReadTable_1,217,60)
46
ReadTable_1.inputPortByName['filename'].widget.set("Data/quiver_data_2.dat", run=False)
47
apply(ReadTable_1.configure, (), {'expanded': True})
49
print "WARNING: failed to restore ReadTable named ReadTable in network masterNet"
54
## saving node As Type ##
55
from Vision.StandardNodes import AsType
56
As_Type_2 = AsType(constrkw = {}, name='As Type', library=stdlib)
57
masterNet.addNode(As_Type_2,60,242)
58
apply(As_Type_2.configure, (), {'expanded': True})
60
print "WARNING: failed to restore AsType named As Type in network masterNet"
65
## saving node As Type ##
66
from Vision.StandardNodes import AsType
67
As_Type_3 = AsType(constrkw = {}, name='As Type', library=stdlib)
68
masterNet.addNode(As_Type_3,241,240)
69
apply(As_Type_3.configure, (), {'expanded': True})
71
print "WARNING: failed to restore AsType named As Type in network masterNet"
76
## saving node Quiver ##
77
from Vision.matplotlibNodes import QuiverNE
78
Quiver_4 = QuiverNE(constrkw = {}, name='Quiver', library=matplotliblib)
79
masterNet.addNode(Quiver_4,183,414)
81
print "WARNING: failed to restore QuiverNE named Quiver in network masterNet"
86
## saving node Text ##
87
from Vision.matplotlibNodes import Text
88
Text_5 = Text(constrkw = {}, name='Text', library=matplotliblib)
89
masterNet.addNode(Text_5,410,194)
90
apply(Text_5.configure, (), {'expanded': True})
92
print "WARNING: failed to restore Text named Text in network masterNet"
97
## saving node MergeText ##
98
from Vision.matplotlibNodes import MPLMergeTextNE
99
MergeText_6 = MPLMergeTextNE(constrkw = {}, name='MergeText', library=matplotliblib)
100
masterNet.addNode(MergeText_6,420,388)
102
print "WARNING: failed to restore MPLMergeTextNE named MergeText in network masterNet"
107
## saving node Draw Area ##
108
from Vision.matplotlibNodes import MPLDrawAreaNE
109
Draw_Area_7 = MPLDrawAreaNE(constrkw = {}, name='Draw Area', library=matplotliblib)
110
masterNet.addNode(Draw_Area_7,261,347)
112
print "WARNING: failed to restore MPLDrawAreaNE named Draw Area in network masterNet"
118
## saving connections for network Quiver ##
119
if ReadTable_0 is not None and As_Type_2 is not None:
121
masterNet.connectNodes(
122
ReadTable_0, As_Type_2, "data", "inArrayList", blocking=True)
124
print "WARNING: failed to restore connection between ReadTable_0 and As_Type_2 in network masterNet"
125
if ReadTable_1 is not None and As_Type_3 is not None:
127
masterNet.connectNodes(
128
ReadTable_1, As_Type_3, "data", "inArrayList", blocking=True)
130
print "WARNING: failed to restore connection between ReadTable_1 and As_Type_3 in network masterNet"
131
if As_Type_2 is not None and Quiver_4 is not None:
133
masterNet.connectNodes(
134
As_Type_2, Quiver_4, "outArray", "u", blocking=True)
136
print "WARNING: failed to restore connection between As_Type_2 and Quiver_4 in network masterNet"
137
if As_Type_3 is not None and Quiver_4 is not None:
139
masterNet.connectNodes(
140
As_Type_3, Quiver_4, "outArray", "v", blocking=True)
142
print "WARNING: failed to restore connection between As_Type_3 and Quiver_4 in network masterNet"
143
if Text_5 is not None and MergeText_6 is not None:
145
masterNet.connectNodes(
146
Text_5, MergeText_6, "drawAreaDef", "textlist", blocking=True)
148
print "WARNING: failed to restore connection between Text_5 and MergeText_6 in network masterNet"
149
if MergeText_6 is not None and Quiver_4 is not None:
151
masterNet.connectNodes(
152
MergeText_6, Quiver_4, "drawAreaDef", "drawAreaDef", blocking=True)
154
print "WARNING: failed to restore connection between MergeText_6 and Quiver_4 in network masterNet"
155
if Draw_Area_7 is not None and Quiver_4 is not None:
157
masterNet.connectNodes(
158
Draw_Area_7, Quiver_4, "drawAreaDef", "drawAreaDef", blocking=True)
160
print "WARNING: failed to restore connection between Draw_Area_7 and Quiver_4 in network masterNet"