######################################################################## # # Vision Network - Python source code - file generated by vision # Thursday 05 April 2007 12:18:52 # # The Scripps Research Institute (TSRI) # Molecular Graphics Lab # La Jolla, CA 92037, USA # # Copyright: Daniel Stoffler, Michel Sanner and TSRI # # revision: Guillaume Vareille # ######################################################################### # # $Header: /export/cvs/python/packages/share1.5/Vision/Examples/matplotlib/Contour_Filled_net.py,v 1.2 2007/04/10 16:21:31 sowjanya Exp $ # # $Id: Contour_Filled_net.py,v 1.2 2007/04/10 16:21:31 sowjanya Exp $ # from traceback import print_exc ## loading libraries ## from Vision.matplotlibNodes import matplotliblib masterNet.getEditor().addLibraryInstance(matplotliblib,"Vision.matplotlibNodes", "matplotliblib") from Vision.StandardNodes import stdlib masterNet.getEditor().addLibraryInstance(stdlib,"Vision.StandardNodes", "stdlib") try: ## saving node Contour ## from Vision.matplotlibNodes import ContourNE Contour_0 = ContourNE(constrkw = {}, name='Contour', library=matplotliblib) masterNet.addNode(Contour_0,132,283) Contour_0.inputPortByName['contour'].widget.set("filledcontour", run=False) Contour_0.inputPortByName['length_colors'].widget.set("10", run=False) apply(Contour_0.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ContourNE named Contour in network masterNet" print_exc() Contour_0=None try: ## saving node ReadTable ## from Vision.StandardNodes import ReadTable ReadTable_1 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib) masterNet.addNode(ReadTable_1,12,20) ReadTable_1.inputPortByName['filename'].widget.set("Data/contour_data_1.dat", run=False) ReadTable_1.inputPortByName['sep'].widget.set(",", run=False) ReadTable_1.inputPortByName['datatype'].widget.set("float", run=False) apply(ReadTable_1.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ReadTable named ReadTable in network masterNet" print_exc() ReadTable_1=None try: ## saving node ReadTable ## from Vision.StandardNodes import ReadTable ReadTable_2 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib) masterNet.addNode(ReadTable_2,179,19) ReadTable_2.inputPortByName['filename'].widget.set("Data/contour_data_2.dat", run=False) ReadTable_2.inputPortByName['sep'].widget.set(",", run=False) ReadTable_2.inputPortByName['datatype'].widget.set("float", run=False) apply(ReadTable_2.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ReadTable named ReadTable in network masterNet" print_exc() ReadTable_2=None try: ## saving node ReadTable ## from Vision.StandardNodes import ReadTable ReadTable_3 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib) masterNet.addNode(ReadTable_3,355,22) ReadTable_3.inputPortByName['filename'].widget.set("Data/contour_data_3.dat", run=False) ReadTable_3.inputPortByName['sep'].widget.set(",", run=False) ReadTable_3.inputPortByName['datatype'].widget.set("float", run=False) apply(ReadTable_3.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ReadTable named ReadTable in network masterNet" print_exc() ReadTable_3=None try: ## saving node As Type ## from Vision.StandardNodes import AsType As_Type_4 = AsType(constrkw = {}, name='As Type', library=stdlib) masterNet.addNode(As_Type_4,28,172) except: print "WARNING: failed to restore AsType named As Type in network masterNet" print_exc() As_Type_4=None try: ## saving node As Type ## from Vision.StandardNodes import AsType As_Type_5 = AsType(constrkw = {}, name='As Type', library=stdlib) masterNet.addNode(As_Type_5,203,159) except: print "WARNING: failed to restore AsType named As Type in network masterNet" print_exc() As_Type_5=None try: ## saving node As Type ## from Vision.StandardNodes import AsType As_Type_6 = AsType(constrkw = {}, name='As Type', library=stdlib) masterNet.addNode(As_Type_6,382,167) except: print "WARNING: failed to restore AsType named As Type in network masterNet" print_exc() As_Type_6=None try: ## saving node ColorBar ## from Vision.matplotlibNodes import ColorBarNE ColorBar_7 = ColorBarNE(constrkw = {}, name='ColorBar', library=matplotliblib) masterNet.addNode(ColorBar_7,206,418) except: print "WARNING: failed to restore ColorBarNE named ColorBar in network masterNet" print_exc() ColorBar_7=None masterNet.freeze() ## saving connections for network Contour ## if ReadTable_1 is not None and As_Type_4 is not None: try: masterNet.connectNodes( ReadTable_1, As_Type_4, "data", "inArrayList", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_1 and As_Type_4 in network masterNet" if ReadTable_2 is not None and As_Type_5 is not None: try: masterNet.connectNodes( ReadTable_2, As_Type_5, "data", "inArrayList", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_2 and As_Type_5 in network masterNet" if ReadTable_3 is not None and As_Type_6 is not None: try: masterNet.connectNodes( ReadTable_3, As_Type_6, "data", "inArrayList", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_3 and As_Type_6 in network masterNet" if As_Type_4 is not None and Contour_0 is not None: try: masterNet.connectNodes( As_Type_4, Contour_0, "outArray", "arraylistx", blocking=True) except: print "WARNING: failed to restore connection between As_Type_4 and Contour_0 in network masterNet" if As_Type_5 is not None and Contour_0 is not None: try: masterNet.connectNodes( As_Type_5, Contour_0, "outArray", "arraylisty", blocking=True) except: print "WARNING: failed to restore connection between As_Type_5 and Contour_0 in network masterNet" if As_Type_6 is not None and Contour_0 is not None: try: masterNet.connectNodes( As_Type_6, Contour_0, "outArray", "arraylistz", blocking=True) except: print "WARNING: failed to restore connection between As_Type_6 and Contour_0 in network masterNet" if Contour_0 is not None and ColorBar_7 is not None: try: masterNet.connectNodes( Contour_0, ColorBar_7, "axes", "plot", blocking=True) except: print "WARNING: failed to restore connection between Contour_0 and ColorBar_7 in network masterNet" if Contour_0 is not None and ColorBar_7 is not None: try: masterNet.connectNodes( Contour_0, ColorBar_7, "contour", "current_image", blocking=True) except: print "WARNING: failed to restore connection between Contour_0 and ColorBar_7 in network masterNet" masterNet.unfreeze() #masterNet.run()