def analyze_batch(batchLabel, batchdatadir=batchdatadir): params, data = batch_utils.load_batch(batchLabel, batchdatadir=batchdatadir) batch = (batchLabel, params, data) batch_analysis.plot_batch_raster(batch, timeRange=[100, 1000], markerSize=0.5, orderInverse=False) batch_analysis.plot_vtraces(batch, timerange=[100, 1000])
def plot_all(): for batch in batches1D: print("Analyzing 1D batch: " + batch) batch_analysis.plot_vtraces_multicell(batch, celllabel="pop") try: #batch_analysis.plot_plat_comps(batch, cellIDs=None, expdata=True) batch_analysis.plot_plat_comps(batch, cellIDs="all", expdata=True) except: print("There was an error executing plot_plat_comps on batch: " + batch) if "glutAmp" in batch: batch_analysis.plot_antic_plateaus(batch) for batch in batches2D: print("Analyzing 2D batch: " + batch) batch_analysis.plot_vtraces(batch) if "bap" in batch: batch_analysis.plot_baps(batch, section=bap_branch)
'allocation': allocation, 'walltime': '00:30:00', 'nodes': 4, 'coresPerNode': 48, 'email': '*****@*****.**', 'folder': runFolder, 'script': 'init.py', 'mpiCommand': 'ibrun', 'skip': True, 'custom': '#SBATCH -p skx-normal' } elif runType == 'mpi_bulletin': b.runCfg = {'type': 'mpi_bulletin', 'script': 'init.py', 'skip': True} else: raise Exception( "Problem in batch file: runType must be either 'hpc_slurm' or 'mpi_bulletin'." ) # Run batch simulations b.run() # Main code if __name__ == '__main__': batchRun() import batch_analysis as ba ba.plot_vtraces(batchLabel) #batch = ba.plot_vtraces(batchLabel, batchdatadir=saveFolder, outputdir=os.path.join(saveFolder, b.batchLabel))
'email': '*****@*****.**', 'folder': runFolder, 'script': 'init.py', 'mpiCommand': 'ibrun', 'skip': True, 'custom': '#SBATCH -p skx-normal' } elif runType == 'mpi_bulletin': if not os.path.isdir('data'): os.mkdir('data') b.saveFolder = 'data/' + b.batchLabel b.runCfg = {'type': 'mpi_bulletin', 'script': 'init.py', 'skip': True} else: raise Exception( "Problem in batch file: runType must be either 'hpc_slurm' or 'mpi_bulletin'." ) # Run batch simulations b.run() # Main code if __name__ == '__main__': batchRun() import batch_analysis as ba batch = ba.plot_vtraces(batchLabel, batchdatadir=saveFolder, outputdir=saveFolder + batchLabel)
'custom': '#SBATCH -p skx-normal' } elif runType == 'mpi_bulletin': b.runCfg = {'type': 'mpi_bulletin', 'script': 'init.py', 'skip': True} else: raise Exception( "Problem in batch file: runType must be either 'hpc_slurm' or 'mpi_bulletin'." ) # Run batch simulations b.run() return batchLabel # Main code if __name__ == '__main__': batchLabel = batchRun(params) import batch_analysis as bp loadedBatch = bp.plot_vtraces(batchLabel) out = bp.plot_traces(loadedBatch, ['iNa_soma', 'iK_soma', 'iL_soma'], cellIDs=[0, 100, 200], param_labels=None, title=None, filename=None, save=True, outputdir=None) os.system("say 'batch completed'")