########################################################################
#
#    Vision Network - Python source code - file generated by vision
#    Friday 13 April 2007 13:30:51 
#    
#       The Scripps Research Institute (TSRI)
#       Molecular Graphics Lab
#       La Jolla, CA 92037, USA
#
# Copyright: Daniel Stoffler, Michel Sanner and TSRI
#   
# revision: Guillaume Vareille
#  
#########################################################################
#
# $Header: /opt/cvs/python/packages/share1.5/Vision/doc/Examples/matplotlib/PcolorClassic_net.py,v 1.3 2007/08/29 20:37:16 vareille Exp $
#
# $Id: PcolorClassic_net.py,v 1.3 2007/08/29 20:37:16 vareille 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 ReadTable ##
    from Vision.StandardNodes import ReadTable
    ReadTable_92 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib)
    masterNet.addNode(ReadTable_92,497,23)
    ReadTable_92.inputPortByName['filename'].widget.set("Data/pcolormesh_data_3.dat", run=False)
    ReadTable_92.inputPortByName['sep'].widget.set(",", run=False)
    ReadTable_92.inputPortByName['datatype'].widget.set("float", run=False)
    apply(ReadTable_92.configure, (), {'expanded': True})
except:
    print "WARNING: failed to restore ReadTable named ReadTable in network masterNet"
    print_exc()
    ReadTable_92=None

try:
    ## saving node As Type ##
    from Vision.StandardNodes import AsType
    As_Type_93 = AsType(constrkw = {}, name='As Type', library=stdlib)
    masterNet.addNode(As_Type_93,390,191)
except:
    print "WARNING: failed to restore AsType named As Type in network masterNet"
    print_exc()
    As_Type_93=None

try:
    ## saving node ReadTable ##
    from Vision.StandardNodes import ReadTable
    ReadTable_94 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib)
    masterNet.addNode(ReadTable_94,8,17)
    ReadTable_94.inputPortByName['filename'].widget.set("Data/pcolormesh_data_1.dat", run=False)
    ReadTable_94.inputPortByName['sep'].widget.set(",", run=False)
    ReadTable_94.inputPortByName['datatype'].widget.set("float", run=False)
    apply(ReadTable_94.configure, (), {'expanded': True})
except:
    print "WARNING: failed to restore ReadTable named ReadTable in network masterNet"
    print_exc()
    ReadTable_94=None

try:
    ## saving node ReadTable ##
    from Vision.StandardNodes import ReadTable
    ReadTable_95 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib)
    masterNet.addNode(ReadTable_95,253,21)
    ReadTable_95.inputPortByName['filename'].widget.set("Data/pcolormesh_data_2.dat", run=False)
    ReadTable_95.inputPortByName['sep'].widget.set(",", run=False)
    ReadTable_95.inputPortByName['datatype'].widget.set("float", run=False)
    apply(ReadTable_95.configure, (), {'expanded': True})
except:
    print "WARNING: failed to restore ReadTable named ReadTable in network masterNet"
    print_exc()
    ReadTable_95=None

try:
    ## saving node As Type ##
    from Vision.StandardNodes import AsType
    As_Type_96 = AsType(constrkw = {}, name='As Type', library=stdlib)
    masterNet.addNode(As_Type_96,60,191)
except:
    print "WARNING: failed to restore AsType named As Type in network masterNet"
    print_exc()
    As_Type_96=None

try:
    ## saving node As Type ##
    from Vision.StandardNodes import AsType
    As_Type_97 = AsType(constrkw = {}, name='As Type', library=stdlib)
    masterNet.addNode(As_Type_97,228,196)
except:
    print "WARNING: failed to restore AsType named As Type in network masterNet"
    print_exc()
    As_Type_97=None

try:
    ## saving node PcolorClassic ##
    from Vision.matplotlibNodes import PcolorClassicNE
    PcolorClassic_98 = PcolorClassicNE(constrkw = {}, name='PcolorClassic', library=matplotliblib)
    masterNet.addNode(PcolorClassic_98,200,266)
except:
    print "WARNING: failed to restore PcolorClassicNE named PcolorClassic in network masterNet"
    print_exc()
    PcolorClassic_98=None

masterNet.freeze()

## saving connections for network PcolorClassic ##
if ReadTable_92 is not None and As_Type_93 is not None:
    try:
        masterNet.connectNodes(
            ReadTable_92, As_Type_93, "data", "inArrayList", blocking=True)
    except:
        print "WARNING: failed to restore connection between ReadTable_92 and As_Type_93 in network masterNet"
if ReadTable_94 is not None and As_Type_96 is not None:
    try:
        masterNet.connectNodes(
            ReadTable_94, As_Type_96, "data", "inArrayList", blocking=True)
    except:
        print "WARNING: failed to restore connection between ReadTable_94 and As_Type_96 in network masterNet"
if ReadTable_95 is not None and As_Type_97 is not None:
    try:
        masterNet.connectNodes(
            ReadTable_95, As_Type_97, "data", "inArrayList", blocking=True)
    except:
        print "WARNING: failed to restore connection between ReadTable_95 and As_Type_97 in network masterNet"
if As_Type_96 is not None and PcolorClassic_98 is not None:
    try:
        masterNet.connectNodes(
            As_Type_96, PcolorClassic_98, "outArray", "arraylistx", blocking=True)
    except:
        print "WARNING: failed to restore connection between As_Type_96 and PcolorClassic_98 in network masterNet"
if As_Type_97 is not None and PcolorClassic_98 is not None:
    try:
        masterNet.connectNodes(
            As_Type_97, PcolorClassic_98, "outArray", "arraylisty", blocking=True)
    except:
        print "WARNING: failed to restore connection between As_Type_97 and PcolorClassic_98 in network masterNet"
if As_Type_93 is not None and PcolorClassic_98 is not None:
    try:
        masterNet.connectNodes(
            As_Type_93, PcolorClassic_98, "outArray", "arraylistz", blocking=True)
    except:
        print "WARNING: failed to restore connection between As_Type_93 and PcolorClassic_98 in network masterNet"
masterNet.unfreeze()
#masterNet.run()

