Ejemplo n.º 1
0
def readPlotNMDA():
    dataFolder = 'data/'
    batchLabel = 'batchNMDA'

    params, data = utils.readBatchData(dataFolder,
                                       batchLabel,
                                       loadAll=0,
                                       saveAll=1,
                                       vars=None,
                                       maxCombs=None)
    plotNMDA(dataFolder, batchLabel, params, data)
Ejemplo n.º 2
0
        print d['paramValues']
        print  epsp
        Lepsp.append({str(d['paramValues']): epsp})
    print Lepsp
    

    
    filename = '%s/%s/%s_epsp.json' % (dataFolder, batchLabel, batchLabel)
    with open(filename, 'w') as fileObj:
        json.dump(Lepsp, fileObj)

    





if __name__ == '__main__':

    dataFolder = '../sim/data'
    batchLabel = 'test2'
    loadFromFile = 0
    saveToFile = 1
    
    filename = '%s/%s/%s_allData.json' % (dataFolder, batchLabel, batchLabel)

    
    params, data = utils.readBatchData(dataFolder, batchLabel) 
    epsp(params, data)

Ejemplo n.º 3
0
import matplotlib.pyplot as plt


def epsp(params, data):
    plt.style.use('ggplot')

    for key, d in data.iteritems():
        vsoma = d['simData']['V_soma']['cell_0']
        epsp = max(vsoma[2000:3000]) - vsoma[
            1999]  # max voltage between 200 to 300 ms - baseline

        print d['paramValues']
        print epsp


# main code
if __name__ == '__main__':

    dataFolder = '../data/'
    batchLabel = 'batch1'
    loadFromFile = 0
    saveToFile = 1

    filename = dataFolder + '/' + batchLabel + '/' + batchLabel + '_match.json'

    params, data = utils.readBatchData(dataFolder,
                                       batchLabel,
                                       load=loadFromFile,
                                       save=saveToFile)
    epsp(params, data)
Ejemplo n.º 4
0
    plt.xticks([0, 50, 100, 150, 200, 250])
    plt.savefig('%s/%s/%s_numepsp.png' % (dataFolder, batchLabel, batchLabel))
    plt.show



    
    filename = '%s/%s/%s_epsp.json' % (dataFolder, batchLabel, batchLabel)
    with open(filename, 'w') as fileObj:
        json.dump(Lepsp, fileObj)

    





if __name__ == '__main__':

    dataFolder = '../sim/data'
    batchLabel = 'Data2'
    loadFromFile = 0
    saveToFile = 1
    
    filename = '%s/%s/%s_allData.json' % (dataFolder, batchLabel, batchLabel)

    
    params, data = utils.readBatchData(dataFolder, batchLabel) 
    epsp(params, data)