mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/0000755000175000017500000000000012146215465020443 5ustar debiandebianmgltools-visionlibraries-1.5.7~rc1~cvs.20130519/setup.py0000644000175000017500000000625310763054706022165 0ustar debiandebianfrom distutils.core import setup from distutils.command.sdist import sdist from distutils.command.install_data import install_data import os from string import find ######################################################################## # Had to overwrite the prunrefile_list method of sdist to not # remove automatically the RCS/CVS directory from the distribution. ######################################################################## class modified_sdist(sdist): def prune_file_list(self): """ Prune off branches that might slip into the file list as created by 'read_template()', but really don't belong there: * the build tree (typically 'build') * the release tree itself (only an issue if we ran 'sdist previously with --keep-temp, or it aborted) """ build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) class modified_install_data(install_data): def run(self): install_cmd = self.get_finalized_command('install') self.install_dir = getattr(install_cmd, 'install_lib') return install_data.run(self) ######################################################################## # list of the python packages to be included in this distribution. # sdist doesn't go recursively into subpackages so they need to be # explicitaly listed. # From these packages only the python modules will be taken packages = ['VisionLibraries', 'VisionLibraries.scipylib', 'VisionLibraries.scipylib.signal', ] # list of the files that are not python packages but are included in the # distribution and need to be installed at the proper place by distutils. # The list in MANIFEST.in lists is needed for including those files in # the distribution, data_files in setup.py is needed to install them # at the right place. data_files = [] def getDataFiles(file_list, directory, names): fs = [] if find(directory, "doc") >= 0: #do not include doc directory in data_files return for name in names: ext = os.path.splitext(name)[1] #print directory, name, ext, len(ext) if ext !=".py" and ext !=".pyc": fullname = os.path.join(directory,name) if not os.path.isdir(fullname): fs.append(fullname) if len(fs): file_list.append((directory, fs)) os.path.walk("VisionLibraries", getDataFiles, data_files) # description of what is going to be included in the distribution and # installed. from version import VERSION setup (name = "VisionLibraries" , version = VERSION, description = "A package containing additional Vision libraries (currently for 'scipy')", author = 'Molecular Graphics Laboratory', author_email = 'mgltools@scripps.edu', download_url = 'http://mgltools.scripps.edu/downloads', url = '', packages = packages, data_files = data_files, cmdclass = {'sdist': modified_sdist, 'install_data': modified_install_data, }, ) mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/0000755000175000017500000000000012146215466023550 5ustar debiandebianmgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/0000755000175000017500000000000012146215465025365 5ustar debiandebianmgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/0000755000175000017500000000000012146215466026643 5ustar debiandebianmgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/freqz.py0000644000175000017500000000575310723372424030353 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Tuesday 27 November 2007 09:18:38 # # 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/VisionLibraries/scipylib/signal/freqz.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # $Id: freqz.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # import node's base class node from NetworkEditor.items import NetworkNode class freqz(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='freqz', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, b, a, fs): from scipy.signal import freqz from scipy import absolute as abs from scipy import log10, pi w,h=freqz(b,a) self.outputData(f=w/pi*(fs/2.0)) self.outputData(H=10*log10(abs(h))) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'b', 'cast': True, 'datatype': 'None', 'balloon': 'filter numerator', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'a', 'cast': True, 'datatype': 'None', 'balloon': 'filter denominator', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'fs', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green'}) self.outputPortsDescr.append( {'name': 'H', 'datatype': 'None', 'balloon': 'abs(h) frequency response', 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green'}) self.outputPortsDescr.append( {'name': 'f', 'datatype': 'array', 'balloon': 'abscissa', 'height': 12, 'width': 12, 'shape': 'oval', 'color': 'cyan'}) self.widgetDescr['a'] = { 'initialValue': 1.0, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'width': 60, 'master': 'node', 'increment': 1.0, 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'a'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/timeRange.py0000644000175000017500000000773011260744146031135 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Thursday 08 November 2007 10:33:01 # # 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/VisionLibraries/scipylib/signal/timeRange.py,v 1.2 2009/09/30 21:06:46 vareille Exp $ # # $Id: timeRange.py,v 1.2 2009/09/30 21:06:46 vareille Exp $ # # import node's base class node from NetworkEditor.items import NetworkNode class timeRange(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='timeRange', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, t0, t1, fs): import scipy data=scipy.arange(t0,t1,1.0/fs) self.outputData(out0=data) self.outputData(fs=fs) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 't0', 'cast': True, 'datatype': 'float', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green', 'originalDatatype': 'None'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 't1', 'cast': True, 'datatype': 'float', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green', 'originalDatatype': 'None'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'fs', 'cast': True, 'datatype': 'float', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green', 'originalDatatype': 'None'}) self.outputPortsDescr.append( {'name': 'out0', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.outputPortsDescr.append( {'name': 'fs', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.widgetDescr['t0'] = { 'initialValue': 0.0, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'increment':0.1, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 't0'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} self.widgetDescr['t1'] = { 'initialValue': 1.0, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 1}, 'increment':0.1, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 1}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 't1'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} self.widgetDescr['fs'] = { 'initialValue': 100, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 2},'increment':5, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 2}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'fs'}, 'class': 'NEThumbWheel', 'oneTurn': 50.0} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/plotAbsFFT.py0000644000175000017500000001325610723372424031165 0ustar debiandebian######################################################################## # # Vision Macro - Python source code - file generated by vision # Tuesday 27 November 2007 10:54:32 # # 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/VisionLibraries/scipylib/signal/plotAbsFFT.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # $Id: plotAbsFFT.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # from NetworkEditor.macros import MacroNode class plotAbsFFT(MacroNode): def __init__(self, constrkw={}, name='plotAbsFFT', **kw): kw['name'] = name apply( MacroNode.__init__, (self,), kw) def beforeAddingToNetwork(self, net): MacroNode.beforeAddingToNetwork(self, net) ## loading libraries ## from Vision.matplotlibNodes import matplotliblib net.editor.addLibraryInstance(matplotliblib,"Vision.matplotlibNodes", "matplotliblib") from MyDefaultLib import mydefaultlib net.editor.addLibraryInstance(mydefaultlib,"MyDefaultLib", "mydefaultlib") def afterAddingToNetwork(self): masterNet = self.macroNetwork from NetworkEditor.macros import MacroNode MacroNode.afterAddingToNetwork(self) ## loading libraries ## from Vision.matplotlibNodes import matplotliblib from MyDefaultLib import mydefaultlib ## building macro network ## plotAbsFFT_0 = self from traceback import print_exc ## loading libraries ## from Vision.matplotlibNodes import matplotliblib self.macroNetwork.getEditor().addLibraryInstance(matplotliblib,"Vision.matplotlibNodes", "matplotliblib") from MyDefaultLib import mydefaultlib self.macroNetwork.getEditor().addLibraryInstance(mydefaultlib,"MyDefaultLib", "mydefaultlib") try: ## saving node input Ports ## input_Ports_1 = self.macroNetwork.ipNode except: print "WARNING: failed to restore MacroInputNode named input Ports in network self.macroNetwork" print_exc() input_Ports_1=None try: ## saving node output Ports ## output_Ports_2 = self.macroNetwork.opNode except: print "WARNING: failed to restore MacroOutputNode named output Ports in network self.macroNetwork" print_exc() output_Ports_2=None try: ## saving node Plot ## from Vision.matplotlibNodes import PlotNE Plot_3 = PlotNE(constrkw = {}, name='Plot', library=matplotliblib) self.macroNetwork.addNode(Plot_3,220,210) except: print "WARNING: failed to restore PlotNE named Plot in network self.macroNetwork" print_exc() Plot_3=None try: ## saving node absFFT ## from MyDefaultLib.signal.absFFT import absFFT absFFT_4 = absFFT(constrkw = {}, name='absFFT', library=mydefaultlib) self.macroNetwork.addNode(absFFT_4,202,122) apply(absFFT_4.inputPortByName['data'].configure, (), {'color': 'white'}) apply(absFFT_4.inputPortByName['fs'].configure, (), {'color': 'white'}) apply(absFFT_4.inputPortByName['nfft'].configure, (), {'color': 'white', 'shape': 'diamond'}) except: print "WARNING: failed to restore absFFT named absFFT in network self.macroNetwork" print_exc() absFFT_4=None self.macroNetwork.run() self.macroNetwork.freeze() ## saving connections for network plotAbsFFT ## if absFFT_4 is not None and Plot_3 is not None: try: self.macroNetwork.connectNodes( absFFT_4, Plot_3, "out0", "y", blocking=True) except: print "WARNING: failed to restore connection between absFFT_4 and Plot_3 in network self.macroNetwork" if absFFT_4 is not None and Plot_3 is not None: try: self.macroNetwork.connectNodes( absFFT_4, Plot_3, "freqs", "x", blocking=True) except: print "WARNING: failed to restore connection between absFFT_4 and Plot_3 in network self.macroNetwork" input_Ports_1 = self.macroNetwork.ipNode if input_Ports_1 is not None and absFFT_4 is not None: try: self.macroNetwork.connectNodes( input_Ports_1, absFFT_4, "new", "data", blocking=True) except: print "WARNING: failed to restore connection between input_Ports_1 and absFFT_4 in network self.macroNetwork" if input_Ports_1 is not None and absFFT_4 is not None: try: self.macroNetwork.connectNodes( input_Ports_1, absFFT_4, "new", "fs", blocking=True) except: print "WARNING: failed to restore connection between input_Ports_1 and absFFT_4 in network self.macroNetwork" output_Ports_2 = self.macroNetwork.opNode if Plot_3 is not None and output_Ports_2 is not None: try: self.macroNetwork.connectNodes( Plot_3, output_Ports_2, "plot", "new", blocking=True) except: print "WARNING: failed to restore connection between Plot_3 and output_Ports_2 in network self.macroNetwork" self.macroNetwork.unfreeze() #self.macroNetwork.run() plotAbsFFT_0.shrink() ## reset modifications ## plotAbsFFT_0.resetTags() plotAbsFFT_0.buildOriginalList() mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/db10FFT.py0000644000175000017500000000566711260744146030317 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Thursday 08 November 2007 10:33:01 # # 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/VisionLibraries/scipylib/signal/db10FFT.py,v 1.2 2009/09/30 21:06:46 vareille Exp $ # # $Id: db10FFT.py,v 1.2 2009/09/30 21:06:46 vareille Exp $ # # import node's base class node from scipy import fft, arange from scipy import absolute as abs from scipy import log10 from NetworkEditor.items import NetworkNode class db10FFT(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='db10FFT', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, data, fs,nfft): data=10*log10(abs(fft(data,nfft))) freqs = arange(0,fs,fs/float(nfft)) self.outputData(out0=data) self.outputData(freqs=freqs) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'data', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'green'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'fs', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'green' }) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'nfft', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green'}) self.outputPortsDescr.append( {'name': 'out0', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.outputPortsDescr.append( {'name': 'freqs', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.widgetDescr['nfft'] = { 'initialValue': 512, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'increment':0.1, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'nfft'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0,'min':2} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/plotdb10FFT.py0000644000175000017500000001332010723372424031176 0ustar debiandebian######################################################################## # # Vision Macro - Python source code - file generated by vision # Tuesday 27 November 2007 10:54:32 # # 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/VisionLibraries/scipylib/signal/plotdb10FFT.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # $Id: plotdb10FFT.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # from NetworkEditor.macros import MacroNode class plotdb10FFT(MacroNode): def __init__(self, constrkw={}, name='plotdb10FFT', **kw): kw['name'] = name apply( MacroNode.__init__, (self,), kw) def beforeAddingToNetwork(self, net): MacroNode.beforeAddingToNetwork(self, net) ## loading libraries ## from Vision.matplotlibNodes import matplotliblib net.editor.addLibraryInstance(matplotliblib,"Vision.matplotlibNodes", "matplotliblib") from MyDefaultLib import mydefaultlib net.editor.addLibraryInstance(mydefaultlib,"MyDefaultLib", "mydefaultlib") def afterAddingToNetwork(self): masterNet = self.macroNetwork from NetworkEditor.macros import MacroNode MacroNode.afterAddingToNetwork(self) ## loading libraries ## from Vision.matplotlibNodes import matplotliblib from MyDefaultLib import mydefaultlib ## building macro network ## plotdb10FFT_0 = self from traceback import print_exc ## loading libraries ## from Vision.matplotlibNodes import matplotliblib self.macroNetwork.getEditor().addLibraryInstance(matplotliblib,"Vision.matplotlibNodes", "matplotliblib") from MyDefaultLib import mydefaultlib self.macroNetwork.getEditor().addLibraryInstance(mydefaultlib,"MyDefaultLib", "mydefaultlib") try: ## saving node input Ports ## input_Ports_1 = self.macroNetwork.ipNode except: print "WARNING: failed to restore MacroInputNode named input Ports in network self.macroNetwork" print_exc() input_Ports_1=None try: ## saving node output Ports ## output_Ports_2 = self.macroNetwork.opNode except: print "WARNING: failed to restore MacroOutputNode named output Ports in network self.macroNetwork" print_exc() output_Ports_2=None try: ## saving node Plot ## from Vision.matplotlibNodes import PlotNE Plot_3 = PlotNE(constrkw = {}, name='Plot', library=matplotliblib) self.macroNetwork.addNode(Plot_3,220,210) except: print "WARNING: failed to restore PlotNE named Plot in network self.macroNetwork" print_exc() Plot_3=None try: ## saving node db10FFT ## from MyDefaultLib.signal.db10FFT import db10FFT db10FFT_4 = db10FFT(constrkw = {}, name='db10FFT', library=mydefaultlib) self.macroNetwork.addNode(db10FFT_4,202,122) apply(db10FFT_4.inputPortByName['data'].configure, (), {'color': 'white'}) apply(db10FFT_4.inputPortByName['fs'].configure, (), {'color': 'white'}) apply(db10FFT_4.inputPortByName['nfft'].configure, (), {'color': 'white', 'shape': 'diamond'}) except: print "WARNING: failed to restore db10FFT named db10FFT in network self.macroNetwork" print_exc() db10FFT_4=None self.macroNetwork.run() self.macroNetwork.freeze() ## saving connections for network plotdb10FFT ## if db10FFT_4 is not None and Plot_3 is not None: try: self.macroNetwork.connectNodes( db10FFT_4, Plot_3, "out0", "y", blocking=True) except: print "WARNING: failed to restore connection between db10FFT_4 and Plot_3 in network self.macroNetwork" if db10FFT_4 is not None and Plot_3 is not None: try: self.macroNetwork.connectNodes( db10FFT_4, Plot_3, "freqs", "x", blocking=True) except: print "WARNING: failed to restore connection between db10FFT_4 and Plot_3 in network self.macroNetwork" input_Ports_1 = self.macroNetwork.ipNode if input_Ports_1 is not None and db10FFT_4 is not None: try: self.macroNetwork.connectNodes( input_Ports_1, db10FFT_4, "new", "data", blocking=True) except: print "WARNING: failed to restore connection between input_Ports_1 and db10FFT_4 in network self.macroNetwork" if input_Ports_1 is not None and db10FFT_4 is not None: try: self.macroNetwork.connectNodes( input_Ports_1, db10FFT_4, "new", "fs", blocking=True) except: print "WARNING: failed to restore connection between input_Ports_1 and db10FFT_4 in network self.macroNetwork" output_Ports_2 = self.macroNetwork.opNode if Plot_3 is not None and output_Ports_2 is not None: try: self.macroNetwork.connectNodes( Plot_3, output_Ports_2, "plot", "new", blocking=True) except: print "WARNING: failed to restore connection between Plot_3 and output_Ports_2 in network self.macroNetwork" self.macroNetwork.unfreeze() #self.macroNetwork.run() plotdb10FFT_0.shrink() ## reset modifications ## plotdb10FFT_0.resetTags() plotdb10FFT_0.buildOriginalList() mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/sampleChirp.py0000644000175000017500000001340310723372424031462 0ustar debiandebian######################################################################## # # Vision Macro - Python source code - file generated by vision # Tuesday 27 November 2007 11:19:09 # # 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/VisionLibraries/scipylib/signal/sampleChirp.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # $Id: sampleChirp.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # from NetworkEditor.macros import MacroNode class sampleChirp(MacroNode): def __init__(self, constrkw={}, name='sampleChirp', **kw): kw['name'] = name apply( MacroNode.__init__, (self,), kw) def beforeAddingToNetwork(self, net): MacroNode.beforeAddingToNetwork(self, net) ## loading libraries ## from MyDefaultLib import mydefaultlib net.editor.addLibraryInstance(mydefaultlib,"MyDefaultLib", "mydefaultlib") def afterAddingToNetwork(self): masterNet = self.macroNetwork from NetworkEditor.macros import MacroNode MacroNode.afterAddingToNetwork(self) ## loading libraries ## from MyDefaultLib import mydefaultlib ## building macro network ## sampleChirp_1 = self from traceback import print_exc ## loading libraries ## from MyDefaultLib import mydefaultlib self.macroNetwork.getEditor().addLibraryInstance(mydefaultlib,"MyDefaultLib", "mydefaultlib") try: ## saving node input Ports ## input_Ports_2 = self.macroNetwork.ipNode except: print "WARNING: failed to restore MacroInputNode named input Ports in network self.macroNetwork" print_exc() input_Ports_2=None try: ## saving node output Ports ## output_Ports_3 = self.macroNetwork.opNode except: print "WARNING: failed to restore MacroOutputNode named output Ports in network self.macroNetwork" print_exc() output_Ports_3=None try: ## saving node linearChirp ## from MyDefaultLib.signal.linearChirp import linearChirp linearChirp_4 = linearChirp(constrkw = {}, name='linearChirp', library=mydefaultlib) self.macroNetwork.addNode(linearChirp_4,206,166) apply(linearChirp_4.inputPortByName['time'].configure, (), {'color': 'green'}) apply(linearChirp_4.outputPortByName['y'].configure, (), {'color': 'green'}) linearChirp_4.inputPortByName['chirpSlope'].unbindWidget() apply(linearChirp_4.configure, (), {'expanded': True}) except: print "WARNING: failed to restore linearChirp named linearChirp in network self.macroNetwork" print_exc() linearChirp_4=None try: ## saving node timeRange ## from MyDefaultLib.signal.timeRange import timeRange timeRange_5 = timeRange(constrkw = {}, name='timeRange', library=mydefaultlib) self.macroNetwork.addNode(timeRange_5,195,95) apply(timeRange_5.outputPortByName['out0'].configure, (), {'color': 'green'}) apply(timeRange_5.outputPortByName['fs'].configure, (), {'color': 'green'}) timeRange_5.inputPortByName['fs'].unbindWidget() except: print "WARNING: failed to restore timeRange named timeRange in network self.macroNetwork" print_exc() timeRange_5=None self.macroNetwork.run() self.macroNetwork.freeze() ## saving connections for network sampleChirp ## if timeRange_5 is not None and linearChirp_4 is not None: try: self.macroNetwork.connectNodes( timeRange_5, linearChirp_4, "out0", "time", blocking=True) except: print "WARNING: failed to restore connection between timeRange_5 and linearChirp_4 in network self.macroNetwork" output_Ports_3 = self.macroNetwork.opNode if linearChirp_4 is not None and output_Ports_3 is not None: try: self.macroNetwork.connectNodes( linearChirp_4, output_Ports_3, "y", "new", blocking=True) except: print "WARNING: failed to restore connection between linearChirp_4 and output_Ports_3 in network self.macroNetwork" input_Ports_2 = self.macroNetwork.ipNode if input_Ports_2 is not None and timeRange_5 is not None: try: self.macroNetwork.connectNodes( input_Ports_2, timeRange_5, "new", "fs", blocking=True) except: print "WARNING: failed to restore connection between input_Ports_2 and timeRange_5 in network self.macroNetwork" if input_Ports_2 is not None and linearChirp_4 is not None: try: self.macroNetwork.connectNodes( input_Ports_2, linearChirp_4, "new", "chirpSlope", blocking=True) except: print "WARNING: failed to restore connection between input_Ports_2 and linearChirp_4 in network self.macroNetwork" self.macroNetwork.unfreeze() #self.macroNetwork.run() #apply(sampleChirp_1.inputPortByName['linearChirp_chirpSlope'].createWidget, (), {'descr':{'initialValue': 0.0, 'labelGridCfg': {'column': 0, 'row': 0}, 'master': 'ParamPanel', 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'chirpSlope'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0}}) sampleChirp_1.shrink() ## reset modifications ## sampleChirp_1.resetTags() sampleChirp_1.buildOriginalList() mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/sinFunc.py0000644000175000017500000001063111260744146030621 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Wednesday 21 November 2007 11:50:30 # # 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/VisionLibraries/scipylib/signal/sinFunc.py,v 1.2 2009/09/30 21:06:46 vareille Exp $ # # $Id: sinFunc.py,v 1.2 2009/09/30 21:06:46 vareille Exp $ # # import node's base class node from NetworkEditor.items import NetworkNode class sinFunc(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='sinFunc', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, fs=10, num_samples, frequency, amplitude, phase): from scipy import pi, sin, arange x=arange(0,num_samples)/float(fs) y=sin(x*2*pi*frequency+phase)*amplitude self.outputData( x=x, y=y) return """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'fs', 'cast': True, 'datatype': 'float', 'balloon': 'sampling frequency', 'required': True, 'height': 12, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'num_samples', 'cast': True, 'datatype': 'None', 'balloon': 'number of samples', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'frequency', 'cast': True, 'datatype': 'None', 'balloon': 'center frequency', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'amplitude', 'cast': True, 'datatype': 'None', 'balloon': 'amplitude', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'phase', 'cast': True, 'datatype': 'None', 'balloon': 'phase', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.outputPortsDescr.append( {'name': 'x', 'datatype': 'None', 'balloon': 'ordinate', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.outputPortsDescr.append( {'name': 'y', 'datatype': 'None', 'balloon': 'abscissa', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.widgetDescr['fs'] = { 'initialValue': 100.0, 'labelGridCfg': {'column': 0, 'row': 1}, 'width': 75, 'height':21, 'master': 'node', 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 1}, 'labelCfg': {'text': 'fs'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} self.widgetDescr['num_samples'] = { 'initialValue': 100.0, 'labelGridCfg': {'column': 0, 'row': 2}, 'width': 75, 'height':21,'master': 'node', 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 2}, 'labelCfg': {'text': 'num_samples'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0,'min':1} self.widgetDescr['frequency'] = { 'initialValue': 1.0, 'labelGridCfg': {'column': 0, 'row': 3}, 'width': 75, 'height':21,'master': 'node', 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 3}, 'labelCfg': {'text': 'frequency'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} self.widgetDescr['amplitude'] = { 'initialValue': 1.0, 'labelGridCfg': {'column': 0, 'row': 4}, 'width': 75, 'height':21,'master': 'node', 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 4}, 'labelCfg': {'text': 'amplitude'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} self.widgetDescr['phase'] = { 'initialValue': 0.0, 'labelGridCfg': {'column': 0, 'row': 5}, 'width': 75, 'height':21,'master': 'node', 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 5}, 'labelCfg': {'text': 'phase'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/wavePlay.py0000644000175000017500000000415410723614731031006 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Monday 26 November 2007 06:48:53 # # 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/VisionLibraries/scipylib/signal/wavePlay.py,v 1.3 2007/11/29 19:58:17 vareille Exp $ # # $Id: wavePlay.py,v 1.3 2007/11/29 19:58:17 vareille Exp $ # import time, wave, pymedia.audio.sound as sound import os # import node's base class node from NetworkEditor.items import NetworkNode class wavePlay(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='wavePlay', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, frames, sample_rate, channels): format= sound.AFMT_S16_LE snd= sound.Output( sample_rate, channels, format ) snd.play( frames ) while snd.isPlaying(): time.sleep(0.05) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'frames', 'cast': True, 'datatype': 'string', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'sample_rate', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'channels', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/db20FFT.py0000644000175000017500000000567011260744146030312 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Thursday 08 November 2007 10:33:01 # # 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/VisionLibraries/scipylib/signal/db20FFT.py,v 1.2 2009/09/30 21:06:46 vareille Exp $ # # $Id: db20FFT.py,v 1.2 2009/09/30 21:06:46 vareille Exp $ # # import node's base class node from scipy import fft, arange from scipy import absolute as abs from scipy import log10 from NetworkEditor.items import NetworkNode class db20FFT(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='db20FFT', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, data, fs, nfft): data=20*log10(abs(fft(data,nfft))) freqs = arange(0,fs,fs/float(nfft)) self.outputData(out0=data) self.outputData(freqs=freqs) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'data', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'green'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'fs', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'green' }) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'nfft', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green'}) self.outputPortsDescr.append( {'name': 'out0', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.outputPortsDescr.append( {'name': 'freqs', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.widgetDescr['nfft'] = { 'initialValue': 512, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'increment':0.1, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'nfft'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0,'min':2} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/linearChirp.py0000644000175000017500000000654710723372424031466 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Monday 26 November 2007 10:07:32 # # 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/VisionLibraries/scipylib/signal/linearChirp.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # $Id: linearChirp.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # import node's base class node from NetworkEditor.items import NetworkNode from scipy.signal import chirp class linearChirp(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='linearChirp', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, time, chirpSlope, f0): t1=time[-1] f1 = chirpSlope*(time[-1]-time[0]) + f0 data=chirp(time,f0,t1,f1,method='linear') self.outputData(y=data) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'time', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'chirpSlope', 'cast': True, 'datatype': 'float', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green', 'originalDatatype': 'None'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'f0', 'cast': True, 'datatype': 'float', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green', 'originalDatatype': 'None'}) self.outputPortsDescr.append( {'name': 'y', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.widgetDescr['chirpSlope'] = { 'initialValue': 1.0, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'increment':5, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'chirpSlope'}, 'class': 'NEThumbWheel', 'oneTurn': 50.0} self.widgetDescr['f0'] = { 'initialValue': 1.0, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 1}, 'increment':5, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 1}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'f0'}, 'class': 'NEThumbWheel', 'oneTurn': 50.0} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/highPass_Remez.py0000644000175000017500000000702110723372424032122 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Tuesday 27 November 2007 06:26:02 # # 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/VisionLibraries/scipylib/signal/highPass_Remez.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # $Id: highPass_Remez.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # import node's base class node from NetworkEditor.items import NetworkNode class highPass_Remez(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='highPass Remez', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, ntaps, fs, passband): from scipy.signal import remez if not ntaps % 2: # if is even ntaps += 1 b=remez(ntaps,[0, .9*(fs/2.0-passband), fs/2.0-passband, fs/2.0],[0, 1],[.1,.9],Hz=fs) ## to ouput data on port filter_coefficients use self.outputData(filter_coefficients=b) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'ntaps', 'cast': True, 'datatype': 'None', 'balloon': 'number of FIR taps', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'fs', 'cast': True, 'datatype': 'None', 'balloon': 'sampling frequency', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'passband', 'cast': True, 'datatype': 'None', 'balloon': 'pass band in units of fs', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.outputPortsDescr.append( {'name': 'filter_coefficients', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.widgetDescr['ntaps'] = { 'initialValue': 10, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'increment':1, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'ntaps'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} self.widgetDescr['passband'] = { 'initialValue': 1.0, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 1}, 'increment':1.0, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 1}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'passband'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/waveRead.py0000644000175000017500000000514610723372424030756 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Monday 26 November 2007 07:29:01 # # 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/VisionLibraries/scipylib/signal/waveRead.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # $Id: waveRead.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # import wave # import node's base class node from NetworkEditor.items import NetworkNode class waveRead(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='waveRead', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, filename): if filename and len(filename): f = wave.open(filename,'rb') sampleRate= f.getframerate() channels= f.getnchannels() datastream= f.readframes( 300000 ) f.close() self.outputData(data=datastream) ## to ouput data on port sample_rate use self.outputData(sample_rate=sampleRate) ## to ouput data on port num_channels use self.outputData(num_channels=channels) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'filename', 'cast': True, 'datatype': 'string', 'required': True, 'height': 8, 'width': 12, 'shape': 'oval', 'color': 'white'}) self.outputPortsDescr.append( {'name': 'data', 'datatype': 'string', 'height': 12, 'width': 12, 'shape': 'oval', 'color': 'cyan'}) self.outputPortsDescr.append( {'name': 'sample_rate', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.outputPortsDescr.append( {'name': 'num_channels', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.widgetDescr['filename'] = { 'initialValue': '', 'labelGridCfg': {'column': 0, 'row': 1}, 'width': 16, 'master': 'node', 'widgetGridCfg': {'labelSide': 'left', 'column': 1, 'row': 1}, 'labelCfg': {'text': 'file:'}, 'class': 'NEEntryWithFileBrowser'} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/absFFT.py0000644000175000017500000000562211260744146030325 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Thursday 08 November 2007 10:33:01 # # 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/VisionLibraries/scipylib/signal/absFFT.py,v 1.2 2009/09/30 21:06:46 vareille Exp $ # # $Id: absFFT.py,v 1.2 2009/09/30 21:06:46 vareille Exp $ # # import node's base class node from scipy import fft, arange from scipy import absolute as abs from NetworkEditor.items import NetworkNode class absFFT(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='absFFT', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, data, fs, nfft): data=abs(fft(data,nfft)) freqs = arange(0,fs,fs/float(nfft)) self.outputData(out0=data) self.outputData(freqs=freqs) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'data', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'green'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'fs', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'green' }) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'nfft', 'cast': True, 'datatype': 'None', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green'}) self.outputPortsDescr.append( {'name': 'out0', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.outputPortsDescr.append( {'name': 'freqs', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.widgetDescr['nfft'] = { 'initialValue': 512, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'increment':0.1, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'nfft'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0,'min':2} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/lFilter.py0000644000175000017500000000535010723372424030616 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Tuesday 27 November 2007 06:29: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/VisionLibraries/scipylib/signal/lFilter.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # $Id: lFilter.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # import node's base class node from NetworkEditor.items import NetworkNode class lFilter(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='lFilter', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, b, a,x): from scipy.signal import lfilter data = lfilter(b,a,x) self.outputData(y=data) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'b', 'cast': True, 'datatype': 'None', 'balloon': 'filter numerator', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'a', 'cast': True, 'datatype': 'None', 'balloon': 'filter denominator', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'x', 'cast': True, 'datatype': 'None', 'balloon': 'signal to filter', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.outputPortsDescr.append( {'name': 'y', 'datatype': 'None', 'balloon': 'filter output', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.widgetDescr['a'] = { 'initialValue': 1, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'increment':1, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'a'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/lowPass_Remez.py0000644000175000017500000000671310723372424032013 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Tuesday 27 November 2007 06:26:02 # # 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/VisionLibraries/scipylib/signal/lowPass_Remez.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # $Id: lowPass_Remez.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # import node's base class node from NetworkEditor.items import NetworkNode class lowPass_Remez(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='lowPass Remez', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, ntaps, fs, passband): from scipy.signal import remez b=remez(ntaps,[0, passband, passband*1.10, fs/2.0],[1, 0],[.9,.1],Hz=fs) ## to ouput data on port filter_coefficients use self.outputData(filter_coefficients=b) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'ntaps', 'cast': True, 'datatype': 'None', 'balloon': 'number of FIR taps', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'fs', 'cast': True, 'datatype': 'None', 'balloon': 'sampling frequency', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'passband', 'cast': True, 'datatype': 'None', 'balloon': 'pass band in units of fs', 'required': True, 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.outputPortsDescr.append( {'name': 'filter_coefficients', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.widgetDescr['ntaps'] = { 'initialValue': 10, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'increment':1, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'ntaps'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} self.widgetDescr['passband'] = { 'initialValue': 1.0, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 1}, 'increment':1.0, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 1}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'passband'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/__init__.py0000644000175000017500000000000110723372424030740 0ustar debiandebian mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/signal/arange.py0000644000175000017500000000744710723372424030463 0ustar debiandebian######################################################################## # # Vision Node - Python source code - file generated by vision # Thursday 08 November 2007 10:33:01 # # 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/VisionLibraries/scipylib/signal/arange.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # $Id: arange.py,v 1.1 2007/11/28 23:09:08 mgltools Exp $ # # import node's base class node from NetworkEditor.items import NetworkNode class arange(NetworkNode): mRequiredTypes = {} mRequiredSynonyms = [ ] def __init__(self, constrkw = {}, name='arange', **kw): kw['constrkw'] = constrkw kw['name'] = name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, in0, in1,in2): import scipy data=scipy.arange(in0,in1,in2) self.outputData(out0=data) """ self.configure(function=code) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'in0', 'cast': True, 'datatype': 'float', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green', 'originalDatatype': 'None'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'in1', 'cast': True, 'datatype': 'float', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green', 'originalDatatype': 'None'}) self.inputPortsDescr.append( {'singleConnection': True, 'name': 'in2', 'cast': True, 'datatype': 'float', 'required': True, 'height': 8, 'width': 12, 'shape': 'circle', 'color': 'green', 'originalDatatype': 'None'}) self.outputPortsDescr.append( {'name': 'out0', 'datatype': 'None', 'height': 8, 'width': 12, 'shape': 'diamond', 'color': 'white'}) self.widgetDescr['in0'] = { 'initialValue': 0.0, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'increment':0.1, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 0}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'in0'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} self.widgetDescr['in1'] = { 'initialValue': 1.0, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 1}, 'increment':0.1, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 1}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'in1'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} self.widgetDescr['in2'] = { 'initialValue': 0.1, 'widgetGridCfgnode': {'rowspan': 1, 'labelSide': 'left', 'column': 1, 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 2},'increment':0.1, 'height': 20, 'labelGridCfg': {'rowspan': 1, 'column': 0, 'sticky': 'w', 'ipady': 0, 'ipadx': 0, 'columnspan': 1, 'pady': 0, 'padx': 0, 'row': 2}, 'width': 60, 'master': 'node', 'wheelPad': 1, 'widgetGridCfg': {'column': 1, 'labelSide': 'left', 'row': 0}, 'labelCfg': {'text': 'in2'}, 'class': 'NEThumbWheel', 'oneTurn': 10.0} def beforeAddingToNetwork(self, net): try: ed = net.getEditor() except: import traceback; traceback.print_exc() print 'Warning! Could not import widgets' mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/scipylib/__init__.py0000644000175000017500000000227610750737712027510 0ustar debiandebian######################################################################## # # Date: Jan 2006 Authors: Guillaume Vareille, Michel Sanner # # vareille@scripps.edu # sanner@scripps.edu # # The Scripps Research Institute (TSRI) # Molecular Graphics Lab # La Jolla, CA 92037, USA # # Copyright: Guillaume Vareille, Michel Sanner and TSRI # # Vision Library Loader # ######################################################################### # # /home/vareille/.mgltools/1.5.0/Vision/UserLibs/MyDefaultLib/__init__.py # Vision will generate this file automatically if it can't find it # from os import sep, path from Vision.VPE import NodeLibrary from Vision.UserLibBuild import userLibBuild dependents = {'scipy':'0.6.0'} libraryColor = '#33BBFF' fileSplit = __file__.split(sep) if fileSplit[-1] == '__init__.pyc' or fileSplit[-1] == '__init__.py': libInstanceName = fileSplit[-2].lower() else: libInstanceName = path.splitext(fileSplit[-1])[0].lower() locals()[libInstanceName] = NodeLibrary(libInstanceName, libraryColor, mode='readWrite') success = userLibBuild(eval(libInstanceName), __file__, dependents=dependents) if success is False: locals().pop(libInstanceName) mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/VisionLibraries/LICENSE0000644000175000017500000000436411033235074024553 0ustar debiandebianThis software is copyrighted by Michel F. Sanner (sanner@scripps.edu) and TSRI. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. MGLTOOLS SOFTWARE LICENSE AGREEMENT. 1. Grant Of Limited License; Software Use Restrictions. The programs received by you will be used only for NON COMMERCIAL purposes. This license is issued to you as an individual. For COMMERCIAL use done with the software please contact Michel F. Sanner for details about commercial usage license agreements. For any question regarding license agreements, please contact Michel Sanner: TSRI, Molecular Biology Department, TCP 26, 10550 North Torrey Pines Road, La Jolla, CA 92037 sanner@scripps.edu tel (858) 784-7742 fax (858) 784-2341 2. COMMERCIAL USAGE is defined as revenues generating activities. These include using this software for consulting activities and selling applications built on top of, or using this software. Scientific research in an academic environment and teaching are considered NON COMMERCIAL. 3. Copying Restrictions. You will not sell or otherwise distribute commercially these programs or derivatives to any other party, whether with or without consideration. 4. Ownership of Software. You will not obtain, and will not attempt to obtain copyright coverage thereon without the express purpose written consent of The Scripps Research Institute and Dr. Sanner. 5. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 6. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/version.py0000644000175000017500000000002011475262453022475 0ustar debiandebianVERSION="1.5.6" mgltools-visionlibraries-1.5.7~rc1~cvs.20130519/MANIFEST.in0000644000175000017500000000047711033237713022203 0ustar debiandebian# This list all other files to be included in the distribution # which are not python modules include MANIFEST.in # include all the CVS directories include VisionLibraries/CVS/* include VisionLibraries/scipylib/CVS/* include VisionLibraries/scipylib/signal/CVS/* include version.py include VisionLibraries/LICENSE