Beispiel #1
0
def writemeans_gc(gcfname, dyeareafname):

    peakd, aread, durd = gpl.gendictgc(gcfname)
    percentpeakd = {}
    for k, val in peakd.iteritems():
        vpercent = [v*100 for v in val]
        percentpeakd[k] = vpercent
    
    percentaread = {}
    for k, val in aread.iteritems():
        vpercent = [v*100 for v in val]
        percentaread[k] = vpercent
    
    dicts = percentpeakd, percentaread, durd
    mpeakd, maread, mdurd, = map(gpl.genlist, dicts)
    print(mpeakd)
    print(maread)
    
    dyearead = gpl.gendictgc2(dyeareafname)[3]
    mdyearead = gpl.genlist(dyearead)

    #wf.writemeans(mpeakd, expt+'_peakf_means.txt')
    #wf.writemeans(maread, expt+'_area_means.txt')
    #wf.writemeans(mdurd, expt+'_dur_means.txt')
    #wf.writemeans(mdyearead, expt+'_dyearea_means.txt')

    writemeans(mpeakd, 'peakf_means.txt')
    writemeans(maread, 'area_means.txt')
    writemeans(mdurd, 'dur_means.txt')
    writemeans(mdyearead, 'dyearea_means.txt')
Beispiel #2
0
def writemeans_gc(gcfname, dyeareafname):

    peakd, aread, durd = gpl.gendictgc(gcfname)
    percentpeakd = {}
    for k, val in peakd.iteritems():
        vpercent = [v * 100 for v in val]
        percentpeakd[k] = vpercent

    percentaread = {}
    for k, val in aread.iteritems():
        vpercent = [v * 100 for v in val]
        percentaread[k] = vpercent

    dicts = percentpeakd, percentaread, durd
    mpeakd, maread, mdurd, = map(gpl.genlist, dicts)
    print(mpeakd)
    print(maread)

    dyearead = gpl.gendictgc2(dyeareafname)[3]
    mdyearead = gpl.genlist(dyearead)

    #wf.writemeans(mpeakd, expt+'_peakf_means.txt')
    #wf.writemeans(maread, expt+'_area_means.txt')
    #wf.writemeans(mdurd, expt+'_dur_means.txt')
    #wf.writemeans(mdyearead, expt+'_dyearea_means.txt')

    writemeans(mpeakd, 'peakf_means.txt')
    writemeans(maread, 'area_means.txt')
    writemeans(mdurd, 'dur_means.txt')
    writemeans(mdyearead, 'dyearea_means.txt')
Beispiel #3
0
def plotdur(k, fname, type='s', ymax=30):
    plt.figure()
    d = genplotlib.gendictgc(fname)[2]
    md = genplotlib.genlist(d)
    print('Duration')
    for tastant, values in d.iteritems():
        print(tastant, np.max(values))
    
    if type == 'b':
        genplotlib.plotdata(d, md, k, 'b', 'seconds', 'Duration', 0, ymax, xlabelsize='medium')
    if type == 's':
        genplotlib.plotdata(d, md, k, 's', 'seconds', 'Duration', -5, ymax+10, xlabelsize='medium')
Beispiel #4
0
def plotpeak(k, fname, type = 's', ymax=1.0):
    plt.figure()
    d = genplotlib.gendictgc(fname)[0]
    md = genplotlib.genlist(d)
    print('Peak')
    for tastant, values in d.iteritems():
        print(tastant, np.max(values))
    if type == 'b':
        genplotlib.plotdata(d, md, k, 'b', '%', 'Peak deltaF/F', 0, ymax, xlabelsize='medium')
    if type == 's':
        genplotlib.plotdata(d, md, k, 's', 'Peak deltaF/F', 'Peak deltaF/F', -0.4, ymax+0.6, 
        xlabelsize='medium')
Beispiel #5
0
def plotarea(k, fname, type='s', ymax=10):
    plt.figure()
    d = genplotlib.gendictgc(fname)[1]
    md = genplotlib.genlist(d)
    print('Area')
    for tastant, values in d.iteritems():
        print(tastant, np.max(values))
    if type == 'b':
        genplotlib.plotdata(d, md, k, 'b', 'intensity-seconds', 'Area under curve', 0, ymax,
                xlabelsize='medium')
    if type == 's':
        genplotlib.plotdata(d, md, k, 's', 'Area under curve', 'Area under curve', 0, ymax+15,i
                xlabelsize='medium')
Beispiel #6
0
def writemeans_gc_nodye(gcfname):

    peakd, aread, durd = gpl.gendictgc(gcfname)
    percentpeakd = {}
    for k, val in peakd.iteritems():
        vpercent = [v*100 for v in val]
        percentpeakd[k] = vpercent
    
    percentaread = {}
    for k, val in aread.iteritems():
        vpercent = [v*100 for v in val]
        percentaread[k] = vpercent
    
    dicts = percentpeakd, percentaread, durd
    mpeakd, maread, mdurd, = map(gpl.genlist, dicts)
    print(mpeakd)
    print(maread)
    
    writemeans(mpeakd, 'peakf_means.txt')
    writemeans(maread, 'area_means.txt')
    writemeans(mdurd, 'dur_means.txt')
Beispiel #7
0
def writemeans_gc_nodye(gcfname):

    peakd, aread, durd = gpl.gendictgc(gcfname)
    percentpeakd = {}
    for k, val in peakd.iteritems():
        vpercent = [v * 100 for v in val]
        percentpeakd[k] = vpercent

    percentaread = {}
    for k, val in aread.iteritems():
        vpercent = [v * 100 for v in val]
        percentaread[k] = vpercent

    dicts = percentpeakd, percentaread, durd
    mpeakd, maread, mdurd, = map(gpl.genlist, dicts)
    print(mpeakd)
    print(maread)

    writemeans(mpeakd, 'peakf_means.txt')
    writemeans(maread, 'area_means.txt')
    writemeans(mdurd, 'dur_means.txt')