コード例 #1
0
def testAll(argv=None):
    if argv is None:
        argv = sys.argv

    print "Loading project from "+ projFile.getCanonicalPath()


    simManager = nc.SimulationManager(projFile,
                                      numConcurrentSims = numConcurrentSims,
                                      verbose = verbose)

    simManager.runMultipleSims(simConfigs =              simConfigs,
                               simDt =                   simDt,
                               simulators =              simulators,
                               runInBackground =         runInBackground,
                               varTimestepNeuron =       varTimestepNeuron,
                               varTimestepTolerance =    varTimestepTolerance,
                               mpiConfig =               mpiConfig,
                               suggestedRemoteRunTime =  suggestedRemoteRunTime)

    simManager.reloadSims(plotVoltageOnly =   plotVoltageOnly,
                          plotSims =          plotSims,
                          analyseSims =       analyseSims)
                          
    report= ""
    
 
    

    print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell13-TCR-FigA7-600"))

    mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.TCRFigA7_600.mep')['TCRFigA7_600']

    for value in range(0,len(mep_from_nml2)):

        mep_from_nml2[value]=1000*mep_from_nml2[value]

    spikeTimesToCheck = {'CGTCR_0': mep_from_nml2}

    spikeTimeAccuracy =  0.00000001

    report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

    print report2
    report = report + report2+ '\n' 

              
          
              

    return report
コード例 #2
0
def testAll(argv=None):
    if argv is None:
        argv = sys.argv

    print "Loading project from "+ projFile.getCanonicalPath()


    simManager = nc.SimulationManager(projFile,
                                      numConcurrentSims = numConcurrentSims,
                                      verbose = verbose)

    simManager.runMultipleSims(simConfigs =              simConfigs,
                               simDt =                   simDt,
                               simulators =              simulators,
                               runInBackground =         runInBackground,
                               varTimestepNeuron =       varTimestepNeuron,
                               varTimestepTolerance =    varTimestepTolerance,
                               mpiConfig =               mpiConfig,
                               suggestedRemoteRunTime =  suggestedRemoteRunTime)

    simManager.reloadSims(plotVoltageOnly =   plotVoltageOnly,
                          plotSims =          plotSims,
                          analyseSims =       analyseSims)
                          
    report= ""
    


    mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.supaxax.mep')['SupAxAx']

    for value in range(0,len(mep_from_nml2)):

        mep_from_nml2[value]=1000*mep_from_nml2[value]

    spikeTimesToCheck = {'CGsupaxax_0': mep_from_nml2}

    spikeTimeAccuracy = 0.711 # ms # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

    report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,
              spikeTimeAccuracy = spikeTimeAccuracy)

    print report2
    report = report + report2+"\n"
      

    return report
コード例 #3
0
def testAll(argv=None):
    if argv is None:
        argv = sys.argv

    print "Loading project from " + projFile.getCanonicalPath()

    simManager = nc.SimulationManager(projFile,
                                      numConcurrentSims=numConcurrentSims,
                                      verbose=verbose)

    simManager.runMultipleSims(simConfigs=simConfigs,
                               simDt=simDt,
                               simulators=simulators,
                               runInBackground=runInBackground,
                               varTimestepNeuron=varTimestepNeuron,
                               varTimestepTolerance=varTimestepTolerance,
                               mpiConfig=mpiConfig,
                               suggestedRemoteRunTime=suggestedRemoteRunTime)

    simManager.reloadSims(plotVoltageOnly=plotVoltageOnly,
                          plotSims=plotSims,
                          analyseSims=analyseSims)

    report = ""

    mep_from_nml2 = nc.loadMepFile(
        '../../NeuroML2/test/.test.supaxax.mep')['SupAxAx']

    for value in range(0, len(mep_from_nml2)):

        mep_from_nml2[value] = 1000 * mep_from_nml2[value]

    spikeTimesToCheck = {'CGsupaxax_0': mep_from_nml2}

    spikeTimeAccuracy = 0.711  # ms # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

    report2 = simManager.checkSims(spikeTimesToCheck=spikeTimesToCheck,
                                   spikeTimeAccuracy=spikeTimeAccuracy)

    print report2
    report = report + report2 + "\n"

    return report
コード例 #4
0
def testAll(argv=None):
    if argv is None:
        argv = sys.argv

    print "Loading project from " + projFile.getCanonicalPath()

    simManager = nc.SimulationManager(projFile,
                                      numConcurrentSims=numConcurrentSims,
                                      verbose=verbose)

    simManager.runMultipleSims(simConfigs=simConfigs,
                               simDt=simDt,
                               simulators=simulators,
                               runInBackground=runInBackground,
                               varTimestepNeuron=varTimestepNeuron,
                               varTimestepTolerance=varTimestepTolerance,
                               mpiConfig=mpiConfig,
                               suggestedRemoteRunTime=suggestedRemoteRunTime)

    simManager.reloadSims(plotVoltageOnly=plotVoltageOnly,
                          plotSims=plotSims,
                          analyseSims=analyseSims)

    report = ""

    if simDt == 0.005:

        if "Default Simulation Configuration" in simConfigs:

            # These were discovered using analyseSims = True above.
            # They need to hold for all simulators
            spikeTimesToCheck = {
                'CG_CML_0':
                nc.loadMepFile('.testNoTable0005.mep')['Current clamp']
            }

            spikeTimeAccuracy = 0.0751  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

            report0 = simManager.checkSims(spikeTimesToCheck=spikeTimesToCheck,
                                           spikeTimeAccuracy=spikeTimeAccuracy)

            print report0
            report = report + report0 + "\n"

            if "Cell7-tuftIB-FigA4-1300" in simConfigs:

                print(
                    "Tests for default project simulation for %s with 0.005 dt in NEURON"
                    % ("Cell7-tuftIB-FigA4-1300"))

                spikeTimesToCheck = {
                    'CGtuftIB_0':
                    nc.loadMepFile('.test.tuftIBFigA4_1300_0005NoTable.mep')
                    ['FigA4']
                }

                spikeTimeAccuracy = 0  #  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

                report2 = simManager.checkSims(
                    spikeTimesToCheck=spikeTimesToCheck,
                    spikeTimeAccuracy=spikeTimeAccuracy)

                print report2
                report = report + report2 + '\n'

            if "Cell7-tuftIB-FigA4-1500" in simConfigs:

                print(
                    "Tests for default project simulation for %s with 0.01 dt in NEURON"
                    % ("Cell7-tuftIB-FigA4-1500"))

                spikeTimesToCheck = {
                    'CGtuftIB_0':
                    nc.loadMepFile('.test.tuftIBFigA4_1500_0005NoTable.mep')
                    ['tuftIBFigA4_1500']
                }

                spikeTimeAccuracy = 0

                report2 = simManager.checkSims(
                    spikeTimesToCheck=spikeTimesToCheck,
                    spikeTimeAccuracy=spikeTimeAccuracy)

                print report2
                report = report + report2 + '\n'

    ######## added by Rokas Stanislovas : tests for all figures with 0.01 dt and default project spatial discretization in NEURON

    if "NEURON" == simulators[0]:

        if simDt == 0.01:

            if "Cell1-supppyrRS-FigA1RS" in simConfigs:

                print(
                    "Tests for default project simulation for %s with 0.01 dt in NEURON"
                    % ("Cell1-supppyrRS-FigA1RS"))

                spikeTimesToCheck = {
                    'CGsuppyrRS_0':
                    nc.loadMepFile('.test.FigA1RSNoTable.mep')['FigA1RS']
                }

                spikeTimeAccuracy = 0

                report2 = simManager.checkSims(
                    spikeTimesToCheck=spikeTimesToCheck,
                    spikeTimeAccuracy=spikeTimeAccuracy)

                print report2
                report = report + report2 + '\n'

            if "Default Simulation Configuration" in simConfigs:

                # These were discovered using analyseSims = True above.
                # They need to hold for all simulators
                spikeTimesToCheck = {
                    'CG_CML_0':
                    nc.loadMepFile('.testNoTable.mep')['Current clamp']
                }

                spikeTimeAccuracy = 0.0751  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

                report0 = simManager.checkSims(
                    spikeTimesToCheck=spikeTimesToCheck,
                    spikeTimeAccuracy=spikeTimeAccuracy)

                print report0
                report = report + report0 + "\n"

    return report
コード例 #5
0
ファイル: RunTests.py プロジェクト: vrhaynes/Thalamocortical
def testAll(argv=None):
    if argv is None:
        argv = sys.argv

    print "Loading project from "+ projFile.getCanonicalPath()


    simManager = nc.SimulationManager(projFile,
                                      numConcurrentSims = numConcurrentSims,
                                      verbose = verbose)

    simManager.runMultipleSims(simConfigs =              simConfigs,
                               simDt =                   simDt,
                               simulators =              simulators,
                               runInBackground =         runInBackground,
                               varTimestepNeuron =       varTimestepNeuron,
                               varTimestepTolerance =    varTimestepTolerance,
                               mpiConfig =               mpiConfig,
                               suggestedRemoteRunTime =  suggestedRemoteRunTime)

    simManager.reloadSims(plotVoltageOnly =   plotVoltageOnly,
                          plotSims =          plotSims,
                          analyseSims =       analyseSims)
                          
    report= ""
    
    
    if simDt==0.005:

       if "Default Simulation Configuration" in simConfigs:
      
          # These were discovered using analyseSims = True above.
          # They need to hold for all simulators
          
          mep_from_nml2=nc.loadMepFile('../generatedNeuroML2/.test.mep')['Current clamp']
          
          for value in range(0,len(mep_from_nml2)):
              
              mep_from_nml2[value]=1000*mep_from_nml2[value]
          
          spikeTimesToCheck = {'CG_CML_0': mep_from_nml2}

          spikeTimeAccuracy = 0.0751  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

          report0 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,
				    spikeTimeAccuracy = spikeTimeAccuracy)

          print report0
          report = report + report0+"\n"
    
       if "Cell2-suppyrFRB-FigA1FRB" in simConfigs:
	
          # These were discovered using analyseSims = True above.
          # They need to hold for all simulators
          
          mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.l23frb.mep')['L23FRB']
          
          for value in range(0,len(mep_from_nml2)):
              
              mep_from_nml2[value]=1000*mep_from_nml2[value]
          
          spikeTimesToCheck = {'CGsuppyrFRB_0': mep_from_nml2}

          spikeTimeAccuracy = 2.32 #  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

          report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,
				    spikeTimeAccuracy = spikeTimeAccuracy)

          print report2
          report = report + report2+ '\n'
      
       if "Cell4-supaxax-FigA2a" in simConfigs:
       
          mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.supaxax.mep')['SupAxAx']
          
          for value in range(0,len(mep_from_nml2)):
              
              mep_from_nml2[value]=1000*mep_from_nml2[value]
	
          spikeTimesToCheck = {'CGsupaxax_0': mep_from_nml2}

          spikeTimeAccuracy = 0.711 # ms # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

          report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,
				    spikeTimeAccuracy = spikeTimeAccuracy)

          print report2
          report = report + report2+"\n"
      
       if "Cell14-nRT-FigA8-00" in simConfigs:
       
          mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.nrt.mep')['nRT']
          
          for value in range(0,len(mep_from_nml2)):
              
              mep_from_nml2[value]=1000*mep_from_nml2[value]
	
          spikeTimesToCheck = {'CGnRT_0': mep_from_nml2}

          spikeTimeAccuracy = 0.271 # ms  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

          report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,
				    spikeTimeAccuracy = spikeTimeAccuracy)

          print report2
          report = report + report2+"\n"
       ###### the .mep tests below are NEURON specific - not tested on other simulators; added by Rokas Stanislovas GSoC 2016 project Cortical Networks
       if "NEURON"==simulators[0]:
          
          if "Cell1-supppyrRS-FigA1RS" in simConfigs:
             
              print("Tests for default project simulation for %s with 0.005 dt in NEURON"%("Cell1-supppyrRS-FigA1RS"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.FigA1RS0005.mep')['FigA1RS']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	
              spikeTimesToCheck = {'CGsuppyrRS_0': mep_from_nml2 }

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n'
              
          if "Cell2-suppyrFRB-FigA1FRB" in simConfigs:
              
              print("Tests for default project simulation for %s with 0.005 dt in NEURON"%("Cell2-suppyrFRB-FigA1FRB"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.FigA1FRB0005.mep')['FigA1FRB']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	
              spikeTimesToCheck = {'CGsuppyrFRB_0': mep_from_nml2 }

              spikeTimeAccuracy = 0.00000001

              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,
				    spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
    
    ###########################
    if "NEURON"==simulators[0]:
    
       if simDt==0.01:
          
          if "Cell1-supppyrRS-FigA1RS" in simConfigs:
             
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell1-supppyrRS-FigA1RS"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.FigA1RS.mep')['FigA1RS']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	
              spikeTimesToCheck = {'CGsuppyrRS_0': mep_from_nml2}

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if "Cell2-suppyrFRB-FigA1FRB" in simConfigs:
          
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell2-suppyrFRB-FigA1FRB"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.FigA1FRB.mep')['FigA1FRB']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGsuppyrFRB_0': mep_from_nml2}

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if  "Cell3-supbask-FigA2a" in simConfigs:
          
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell3-supbask-FigA2a"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.supbaskFigA2a.mep')['supbaskFigA2a']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]

              spikeTimesToCheck = {'CGsupbask_0': mep_from_nml2}

              spikeTimeAccuracy =  0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if  "Cell4-supaxax-FigA2a" in simConfigs:
          
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell4-supaxax-FigA2a"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.supaxaxFigA2a.mep')['supaxaxFigA2a']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGsupaxax_0': mep_from_nml2}

              spikeTimeAccuracy =  0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if  "Cell5-supLTS-FigA2b" in simConfigs:
          
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell5-supLTS-FigA2b"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.supLTSFigA2b.mep')['supLTSFigA2b']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
                 
              spikeTimesToCheck = {'CGsupLTS_0': mep_from_nml2}

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if  "Cell6-spinstell-FigA3-333" in simConfigs:
              
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell6-spinstell-FigA3-333"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.spinstellFigA3_333.mep')['spinstellFigA3_333']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	
              spikeTimesToCheck = {'CGspinstell_0': mep_from_nml2 }

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if  "Cell7-tuftIB-FigA4-1300" in simConfigs:
          
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell7-tuftIB-FigA4-1300"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.tuftIBFigA4_1300.mep')['tuftIBFigA4_1300']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGtuftIB_0': mep_from_nml2}

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if  "Cell7-tuftIB-FigA4-1500" in simConfigs:
          
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell7-tuftIB-FigA4-1500"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.tuftIBFigA4_1500.mep')['tuftIBFigA4_1500']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGtuftIB_0': mep_from_nml2}

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if  "Cell8-tuftRS-Fig5A-1400" in simConfigs:
          
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell8-tuftRS-Fig5A-1400"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.tuftRSFig5A_1400.mep')['tuftRSFig5A_1400']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGtuftRS_0': mep_from_nml2}

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if "Cell9-nontuftRS-FigA6-1000" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell9-nontuftRS-FigA6-1000"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.nontuftRSFigA6_1000.mep')['nontuftRSFigA6_1000']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGnontuftRS_0': mep_from_nml2}

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if "Cell12-deepLTS-FigA2b" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell12-deepLTS-FigA2b"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.deepLTSFigA2b.mep')['deepLTSFigA2b']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGdeepLTS_0': mep_from_nml2}

              spikeTimeAccuracy =  0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if "Cell13-TCR-FigA7-600" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell13-TCR-FigA7-600"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.TCRFigA7_600.mep')['TCRFigA7_600']
	 
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGTCR_0': mep_from_nml2}

              spikeTimeAccuracy =  0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if "Cell14-nRT-FigA8-00" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell14-nRT-FigA8-00"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.nRTFigA8_00.mep')['nRTFigA8_00']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGnRT_0': mep_from_nml2}

              spikeTimeAccuracy =  0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n'      
               
          if  "Cell1-supppyrRS-10ms" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell1-supppyrRS-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.suppyrRS10ms.mep')['suppyrRS10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGsuppyrRS_0': mep_from_nml2 }

              spikeTimeAccuracy =  0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n'  
              
          if  "Cell2-suppyrFRB-10ms" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell2-suppyrFRB-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.suppyrFRB10ms.mep')['suppyrFRB10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGsuppyrFRB_0': mep_from_nml2 }

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n'  
              
          if  "Cell3-supbask-10ms" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell3-supbask-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.supbask10ms.mep')['supbask10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGsupbask_0': mep_from_nml2 }

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n'  
              
          if  "Cell4-supaxax-10ms" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell4-supaxax-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.supaxax10ms.mep')['supaxax10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	
              spikeTimesToCheck = {'CGsupaxax_0': mep_from_nml2 }

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n'  
              
          if "Cell5-supLTS-10ms" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell5-supLTS-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.supLTS10ms.mep')['supLTS10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGsupLTS_0': mep_from_nml2 }

              spikeTimeAccuracy =  0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n'  
               
          if "Cell6-spinstell-10ms" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell6-spinstell-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.spinstell10ms.mep')['spinstell10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGspinstell_0': mep_from_nml2}

              spikeTimeAccuracy =  0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n'  
              
          if "Cell7-tuftIB-10ms" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell7-tuftIB-10ms"))
              
              mep_from_nml2= nc.loadMepFile('../../NeuroML2/test/.test.tuftIB10ms.mep')['tuftIB10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGtuftIB_0': mep_from_nml2}

              spikeTimeAccuracy =  0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n'  
              
          if "Cell8-tuftRS-10ms" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell8-tuftRS-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.tuftRS10ms.mep')['tuftRS10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGtuftRS_0': mep_from_nml2}

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n'
              
          if "Cell9-nontuftRS-10ms" in simConfigs:
       
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell9-nontuftRS-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.nontuftRS10ms.mep')['nontuftRS10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGnontuftRS_0': mep_from_nml2}

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n'
              
          if "Cell10-deepbask-10ms" in simConfigs:
      
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell10-deepbask-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.deepbask10ms.mep')['deepbask10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGdeepbask_0': mep_from_nml2}

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if "Cell11-deepaxax-10ms" in simConfigs:
      
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell11-deepaxax-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.deepaxax10ms.mep')['deepaxax10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGdeepaxax_0': mep_from_nml2}

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if "Cell12-deepLTS-10ms" in simConfigs:
      
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell12-deepLTS-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.deepLTS10ms.mep')['deepLTS10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGdeepLTS_0': mep_from_nml2}

              spikeTimeAccuracy =  0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if "Cell13-TCR-10ms" in simConfigs:
      
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell13-TCR-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.TCR10ms.mep')['TCR10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	    
              spikeTimesToCheck = {'CGTCR_0': mep_from_nml2 }

              spikeTimeAccuracy = 0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
              
          if "Cell14-nRT-10ms" in simConfigs:
      
              print("Tests for default project simulation for %s with 0.01 dt in NEURON"%("Cell14-nRT-10ms"))
              
              mep_from_nml2=nc.loadMepFile('../../NeuroML2/test/.test.nRT10ms.mep')['nRT10ms']
              
              for value in range(0,len(mep_from_nml2)):
              
                  mep_from_nml2[value]=1000*mep_from_nml2[value]
	 
              spikeTimesToCheck = {'CGnRT_min75init_0': mep_from_nml2}

              spikeTimeAccuracy =  0.00000001
  
              report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,spikeTimeAccuracy = spikeTimeAccuracy)

              print report2
              report = report + report2+ '\n' 
          
              

    return report
コード例 #6
0
def testAll(argv=None):
    if argv is None:
        argv = sys.argv

    print "Loading project from "+ projFile.getCanonicalPath()


    simManager = nc.SimulationManager(projFile,
                                      numConcurrentSims = numConcurrentSims,
                                      verbose = verbose)

    simManager.runMultipleSims(simConfigs =              simConfigs,
                               simDt =                   simDt,
                               simulators =              simulators,
                               runInBackground =         runInBackground,
                               varTimestepNeuron =       varTimestepNeuron,
                               varTimestepTolerance =    varTimestepTolerance,
                               mpiConfig =               mpiConfig,
                               suggestedRemoteRunTime =  suggestedRemoteRunTime)

    simManager.reloadSims(plotVoltageOnly =   plotVoltageOnly,
                          plotSims =          plotSims,
                          analyseSims =       analyseSims)
                          
    report= ""

    if "Default Simulation Configuration" in simConfigs:
      
      # These were discovered using analyseSims = True above.
      # They need to hold for all simulators
      spikeTimesToCheck = {'CG_CML_0': nc.loadMepFile('.test.mep')['Current clamp']}

      spikeTimeAccuracy = 0.0751  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

      report0 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,
				    spikeTimeAccuracy = spikeTimeAccuracy)

      print report0
      report = report + report0+"\n"
    
    if "Cell2-suppyrFRB-FigA1FRB" in simConfigs:
	
      # These were discovered using analyseSims = True above.
      # They need to hold for all simulators
      spikeTimesToCheck = {'CGsuppyrFRB_0': nc.loadMepFile('.test.l23frb.mep')['L23FRB']}

      spikeTimeAccuracy = 2.32 #  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

      report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,
				    spikeTimeAccuracy = spikeTimeAccuracy)

      print report2
      report = report + report2+ '\n'
      
    if "Cell4-supaxax-FigA2a" in simConfigs:
	
      spikeTimesToCheck = {'CGsupaxax_0': nc.loadMepFile('.test.supaxax.mep')['SupAxAx']}

      spikeTimeAccuracy = 0.711 # ms # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

      report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,
				    spikeTimeAccuracy = spikeTimeAccuracy)

      print report2
      report = report + report2+"\n"
      
    if "Cell14-nRT-FigA8-00" in simConfigs:
	
      spikeTimesToCheck = {'CGnRT_0': nc.loadMepFile('.test.nrt.mep')['nRT']}

      spikeTimeAccuracy = 0.271 # ms  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

      report2 = simManager.checkSims(spikeTimesToCheck = spikeTimesToCheck,
				    spikeTimeAccuracy = spikeTimeAccuracy)

      print report2
      report = report + report2+"\n"
      

    return report
コード例 #7
0
varTimestepNeuron = False
varTimestepTolerance = 0.00001

analyseSims = True
plotSims = True
plotVoltageOnly = True

simAllPrefix = ""  # Adds a prefix to simulation reference

runInBackground = True  #(mpiConf == MpiSettings.LOCAL_SERIAL)

suggestedRemoteRunTime = 233

verbose = True

spike_times = nc.loadMepFile('../generatedNeuroML2/.test.mep', scale=1000)

#############################################


def testAll(argv=None):
    if argv is None:
        argv = sys.argv

    print "Loading project from " + projFile.getCanonicalPath()

    simManager = nc.SimulationManager(projFile,
                                      numConcurrentSims=2,
                                      verbose=verbose)

    simManager.runMultipleSims(simConfigs=simConfigs,
コード例 #8
0
def testAll(argv=None):
    if argv is None:
        argv = sys.argv

    print "Loading project from " + projFile.getCanonicalPath()

    simManager = nc.SimulationManager(projFile, numConcurrentSims=numConcurrentSims, verbose=verbose)

    simManager.runMultipleSims(
        simConfigs=simConfigs,
        simDt=simDt,
        simulators=simulators,
        runInBackground=runInBackground,
        varTimestepNeuron=varTimestepNeuron,
        varTimestepTolerance=varTimestepTolerance,
        mpiConfig=mpiConfig,
        suggestedRemoteRunTime=suggestedRemoteRunTime,
    )

    simManager.reloadSims(plotVoltageOnly=plotVoltageOnly, plotSims=plotSims, analyseSims=analyseSims)

    report = ""

    if simDt == 0.005:

        if "Default Simulation Configuration" in simConfigs:

            # These were discovered using analyseSims = True above.
            # They need to hold for all simulators
            spikeTimesToCheck = {"CG_CML_0": nc.loadMepFile(".testNoTable0005.mep")["Current clamp"]}

            spikeTimeAccuracy = (
                0.0751
            )  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

            report0 = simManager.checkSims(spikeTimesToCheck=spikeTimesToCheck, spikeTimeAccuracy=spikeTimeAccuracy)

            print report0
            report = report + report0 + "\n"

            if "Cell7-tuftIB-FigA4-1300" in simConfigs:

                print (
                    "Tests for default project simulation for %s with 0.005 dt in NEURON" % ("Cell7-tuftIB-FigA4-1300")
                )

                spikeTimesToCheck = {"CGtuftIB_0": nc.loadMepFile(".test.tuftIBFigA4_1300_0005NoTable.mep")["FigA4"]}

                spikeTimeAccuracy = (
                    0
                )  #  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

                report2 = simManager.checkSims(spikeTimesToCheck=spikeTimesToCheck, spikeTimeAccuracy=spikeTimeAccuracy)

                print report2
                report = report + report2 + "\n"

            if "Cell7-tuftIB-FigA4-1500" in simConfigs:

                print (
                    "Tests for default project simulation for %s with 0.01 dt in NEURON" % ("Cell7-tuftIB-FigA4-1500")
                )

                spikeTimesToCheck = {
                    "CGtuftIB_0": nc.loadMepFile(".test.tuftIBFigA4_1500_0005NoTable.mep")["tuftIBFigA4_1500"]
                }

                spikeTimeAccuracy = 0

                report2 = simManager.checkSims(spikeTimesToCheck=spikeTimesToCheck, spikeTimeAccuracy=spikeTimeAccuracy)

                print report2
                report = report + report2 + "\n"

    ######## added by Rokas Stanislovas : tests for all figures with 0.01 dt and default project spatial discretization in NEURON

    if "NEURON" == simulators[0]:

        if simDt == 0.01:

            if "Cell1-supppyrRS-FigA1RS" in simConfigs:

                print (
                    "Tests for default project simulation for %s with 0.01 dt in NEURON" % ("Cell1-supppyrRS-FigA1RS")
                )

                spikeTimesToCheck = {"CGsuppyrRS_0": nc.loadMepFile(".test.FigA1RSNoTable.mep")["FigA1RS"]}

                spikeTimeAccuracy = 0

                report2 = simManager.checkSims(spikeTimesToCheck=spikeTimesToCheck, spikeTimeAccuracy=spikeTimeAccuracy)

                print report2
                report = report + report2 + "\n"

            if "Default Simulation Configuration" in simConfigs:

                # These were discovered using analyseSims = True above.
                # They need to hold for all simulators
                spikeTimesToCheck = {"CG_CML_0": nc.loadMepFile(".testNoTable.mep")["Current clamp"]}

                spikeTimeAccuracy = (
                    0.0751
                )  # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON

                report0 = simManager.checkSims(spikeTimesToCheck=spikeTimesToCheck, spikeTimeAccuracy=spikeTimeAccuracy)

                print report0
                report = report + report0 + "\n"

    return report
コード例 #9
0
varTimestepTolerance =  0.00001

analyseSims =           True
plotSims =              True
plotVoltageOnly =       True


simAllPrefix =          ""   # Adds a prefix to simulation reference

runInBackground =       True #(mpiConf == MpiSettings.LOCAL_SERIAL)

suggestedRemoteRunTime = 233

verbose =               True

spike_times = nc.loadMepFile('../generatedNeuroML2/.test.mep',scale=1000)

#############################################


def testAll(argv=None):
    if argv is None:
        argv = sys.argv

    print "Loading project from "+ projFile.getCanonicalPath()


    simManager = nc.SimulationManager(projFile,
                                      numConcurrentSims = 2,
                                      verbose = verbose)