sys.path.append(os.environ["NC_HOME"]+"/pythonNeuroML/nCUtils") import ncutils as nc # Many useful functions such as SimManager.runMultipleSims found here projFile = File(os.getcwd(), "../Thalamocortical.ncx") simConfigs = [] #simConfigs.append("TestNML2") simConfigs.append("Default Simulation Configuration") if len(sys.argv)==2 and sys.argv[1] == "-v1": print("Generating NeuroML v1.8.1 files...") nc.generateNeuroML1(projFile, simConfigs) else: nc.generateNeuroML2(projFile, simConfigs) # Some extra files have been committed for testing or to provide other LEMS/NeuroML 2 examples # This just pulls them from the repository, since they get wiped by the generateNeuroML2 function extra_files = ['.test.*', 'channel_summary', 'updateNML2.sh', 'LEMS_SomaTest.xml', 'Test.net.nml', 'analyse_chans.sh', '*.synapse.nml', 'L*.cell.nml',
quit() sys.path.append(os.environ["NC_HOME"]+"/pythonNeuroML/nCUtils") import ncutils as nc # Many useful functions such as SimManager.runMultipleSims found here projFile = File(os.getcwd(), "../PyloricPacemakerNetwork.ncx") simConfigs = [] simConfigs.append("Default Simulation Configuration") if len(sys.argv)==2 and sys.argv[1] == "-v1": print("Generating NeuroML v1.8.1 files...") nc.generateNeuroML1(projFile, simConfigs) else: nc.generateNeuroML2(projFile, simConfigs) extra_files = ['.test.*'] if len(sys.argv)==2 and sys.argv[1] == "-f": extra_files.append('LEMS_PyloricPacemakerNetwork.xml') extra_files.append('PyloricPacemakerNetwork.net.nml') from subprocess import call for f in extra_files: call(["git", "checkout", "../generatedNeuroML2/%s"%f]) quit()
try: from java.io import File except ImportError: print "Note: this file should be run using 'nC.bat -python XXX.py' or 'nC.sh -python XXX.py'" print "which use Jython (and so can access the Java classes in nC), as opposed to standard C based Python" print "See http://www.neuroconstruct.org/docs/python.html for more details" quit() sys.path.append(os.environ["NC_HOME"]+"/pythonNeuroML/nCUtils") import ncutils as nc # Many useful functions such as SimManager.runMultipleSims found here projFile = File(os.getcwd(), "../SolinasEtAl-GolgiCell.ncx") print("Generating NeuroML v1.8.1 files...") nc.generateNeuroML1(projFile, ['Fig. 2A: Pacemaking']) print("Generating NeuroML v2 files...") nc.generateNeuroML2(projFile, ['Fig. 2A: Pacemaking']) # Some extra files have been committed for testing or to provide other LEMS/NeuroML 2 examples # This just pulls them from the repository, since they get wiped by the generateNeuroML2 function extra_files = ['.test.*', 'channel_summary', 'analyse_chans.sh', 'compare_nml2_mods.py', '../generatedNeuroML/.test.validate.omt'] if len(sys.argv)==2 and sys.argv[1] == "-f": extra_files.append('SolinasEtAl-GolgiCell.net.nml') from subprocess import call for f in extra_files: call(["git", "checkout", "../generatedNeuroML2/%s"%f])