<commit_before>from helpers.plotter import DoublePlotter

from neuronvisio.manager import Manager

import matplotlib.pyplot as plt
import os 

spine_num = 'spine532'

filename = 'storage.h5'

#dirs = {'1spine_8Hz' : 'Data/05-05-2011/Sim_0/',
#        '1spine_4Hz' : 'Data/04-05-2011/Sim_1/',
#        '1spine_1Hz' : 'Data/03-05-2011/Sim_3/',
#        '1spine_50Hz' : 'Data/03-05-2011/Sim_2/'
#        }

dirs = {'short_tdouble_stims' : 'Data/short_tstop_double_stim_20110113-195840'
        }

for condition, dir in dirs.iteritems():
    h5_filename = dir + 'storage.h5'
    man = Manager()
    man.load_from_hdf(h5_filename)
    dp = DoublePlotter()
    ax1, ax2 = dp.plot_double_axes(man, 'spine532', 'v', 
        'AMPAR_P', bio_group='timeSeries_spine532')
    for ext in ['.png', '.pdf']:
        name = 'ele_bio' + condition + ext
        fig_filename = os.path.join(dir, name)
        plt.savefig(fig_filename)<commit_msg>Saving the figure in the Sims directory.<commit_after>from helpers.plotter import DoublePlotter

from neuronvisio.manager import Manager

import matplotlib.pyplot as plt
import os 



filename = 'storage.h5'

spine_num = 'spine532'
dirs = {'1spine_8Hz' : 'Data/05-05-2011/Sim_0/',
        '1spine_4Hz' : 'Data/04-05-2011/Sim_1/',
        '1spine_1Hz' : 'Data/03-05-2011/Sim_3/',
        '1spine_50Hz' : 'Data/03-05-2011/Sim_2/'
        }

#spine_num = 'spine1'
#dirs = {'short_tdouble_stims' : 
#        'Data/short_tstop_double_stim_20110113-195840/'}

for condition, dir in dirs.iteritems():
    h5_filename = dir + 'storage.h5'
    man = Manager()
    man.load_from_hdf(h5_filename)
    dp = DoublePlotter()
    
    biogroup = 'timeSeries_' + spine_num
    ax1, ax2 = dp.plot_double_axes(man, spine_num, 'v', 
        'AMPAR_P', bio_group=biogroup)
    
    for ext in ['.png', '.pdf']:
        name = 'ele_bio' + condition + ext
        fig_filename = os.path.join(dir, name)
        plt.savefig(fig_filename)
        print "Saved file %s" %fig_filename
{'fraction_non_alphanumeric': 0.13940613990941117, 'fraction_numerical': 0.07196779063915451, 'mean_word_length': 3.065439672801636, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6312319', 'n_tokens_mistral': 865, 'n_tokens_neox': 782, 'n_words': 141}