######################################################################## # # Vision Network - Python source code - file generated by vision # Friday 13 April 2007 12:42:25 # # 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_net.py,v 1.3 2007/04/16 19:05:51 sowjanya Exp $ # # $Id: Contour_net.py,v 1.3 2007/04/16 19:05:51 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_24 = ContourNE(constrkw = {}, name='Contour', library=matplotliblib) masterNet.addNode(Contour_24,215,317) Contour_24.inputPortByName['length_colors'].widget.set("10", run=False) except: print "WARNING: failed to restore ContourNE named Contour in network masterNet" print_exc() Contour_24=None try: ## saving node ReadTable ## from Vision.StandardNodes import ReadTable ReadTable_25 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib) masterNet.addNode(ReadTable_25,12,20) ReadTable_25.inputPortByName['filename'].widget.set("Data/contour_data_1.dat", run=False) ReadTable_25.inputPortByName['sep'].widget.set(",", run=False) ReadTable_25.inputPortByName['datatype'].widget.set("float", run=False) apply(ReadTable_25.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ReadTable named ReadTable in network masterNet" print_exc() ReadTable_25=None try: ## saving node ReadTable ## from Vision.StandardNodes import ReadTable ReadTable_26 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib) masterNet.addNode(ReadTable_26,251,22) ReadTable_26.inputPortByName['filename'].widget.set("Data/contour_data_2.dat", run=False) ReadTable_26.inputPortByName['sep'].widget.set(",", run=False) ReadTable_26.inputPortByName['datatype'].widget.set("float", run=False) apply(ReadTable_26.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ReadTable named ReadTable in network masterNet" print_exc() ReadTable_26=None try: ## saving node ReadTable ## from Vision.StandardNodes import ReadTable ReadTable_27 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib) masterNet.addNode(ReadTable_27,489,24) ReadTable_27.inputPortByName['filename'].widget.set("Data/contour_data_3.dat", run=False) ReadTable_27.inputPortByName['sep'].widget.set(",", run=False) ReadTable_27.inputPortByName['datatype'].widget.set("float", run=False) apply(ReadTable_27.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ReadTable named ReadTable in network masterNet" print_exc() ReadTable_27=None try: ## saving node As Type ## from Vision.StandardNodes import AsType As_Type_28 = AsType(constrkw = {}, name='As Type', library=stdlib) masterNet.addNode(As_Type_28,29,213) except: print "WARNING: failed to restore AsType named As Type in network masterNet" print_exc() As_Type_28=None try: ## saving node As Type ## from Vision.StandardNodes import AsType As_Type_29 = AsType(constrkw = {}, name='As Type', library=stdlib) masterNet.addNode(As_Type_29,215,211) except: print "WARNING: failed to restore AsType named As Type in network masterNet" print_exc() As_Type_29=None try: ## saving node As Type ## from Vision.StandardNodes import AsType As_Type_30 = AsType(constrkw = {}, name='As Type', library=stdlib) masterNet.addNode(As_Type_30,408,211) except: print "WARNING: failed to restore AsType named As Type in network masterNet" print_exc() As_Type_30=None try: ## saving node ColorBar ## from Vision.matplotlibNodes import ColorBarNE ColorBar_31 = ColorBarNE(constrkw = {}, name='ColorBar', library=matplotliblib) masterNet.addNode(ColorBar_31,219,398) except: print "WARNING: failed to restore ColorBarNE named ColorBar in network masterNet" print_exc() ColorBar_31=None masterNet.freeze() ## saving connections for network Contour ## if ReadTable_25 is not None and As_Type_28 is not None: try: masterNet.connectNodes( ReadTable_25, As_Type_28, "data", "inArrayList", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_25 and As_Type_28 in network masterNet" if ReadTable_26 is not None and As_Type_29 is not None: try: masterNet.connectNodes( ReadTable_26, As_Type_29, "data", "inArrayList", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_26 and As_Type_29 in network masterNet" if ReadTable_27 is not None and As_Type_30 is not None: try: masterNet.connectNodes( ReadTable_27, As_Type_30, "data", "inArrayList", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_27 and As_Type_30 in network masterNet" if As_Type_28 is not None and Contour_24 is not None: try: masterNet.connectNodes( As_Type_28, Contour_24, "outArray", "arraylistx", blocking=True) except: print "WARNING: failed to restore connection between As_Type_28 and Contour_24 in network masterNet" if As_Type_29 is not None and Contour_24 is not None: try: masterNet.connectNodes( As_Type_29, Contour_24, "outArray", "arraylisty", blocking=True) except: print "WARNING: failed to restore connection between As_Type_29 and Contour_24 in network masterNet" if As_Type_30 is not None and Contour_24 is not None: try: masterNet.connectNodes( As_Type_30, Contour_24, "outArray", "arraylistz", blocking=True) except: print "WARNING: failed to restore connection between As_Type_30 and Contour_24 in network masterNet" if Contour_24 is not None and ColorBar_31 is not None: try: masterNet.connectNodes( Contour_24, ColorBar_31, "axes", "plot", blocking=True) except: print "WARNING: failed to restore connection between Contour_24 and ColorBar_31 in network masterNet" if Contour_24 is not None and ColorBar_31 is not None: try: masterNet.connectNodes( Contour_24, ColorBar_31, "contour", "current_image", blocking=True) except: print "WARNING: failed to restore connection between Contour_24 and ColorBar_31 in network masterNet" masterNet.unfreeze() #masterNet.run()