예제 #1
0
sim_name = 'MSsim'

ISIs = [
    -.2, -.1, -.05, -.03, -.02, -0.01, -0.005, 0.005, .01, .02, .03, .05, .1,
    .2
]
from text_files import text_sim_1, text_sim_2, text_sim_3
fname_info = """
str diskpath="SimData/"@{Protocol}@"_"@{DA}@"_"@{Timing}@"_"@{Location}@"_Ca_ext_"@{external_Ca}
"""
locations = [
    'tertdend1_2', 'tertdend1_1', 'tertdend1_3', 'tertdend1_4', 'tertdend1_5',
    'tertdend1_6', 'tertdend1_8', 'tertdend1_10', 'tertdend1_11'
]
if __name__ == '__main__':
    params = mp.read_file('SimParams.g')
    gabaYesNo = 0  #mp.find_value(params,'GABAYesNo','Pre')
    spines = mp.find_string(params, 'whichSpines', 'Pre')
    stim_start = mp.find_value(params, 'initSim', 'Pre')
    too_fast = mp.find_value(params, 'TooFast', 'Pre')
    print(gabaYesNo, spines, stim_start, too_fast)
    protocols = ['InOut/P_K.g']
    timings = ['Pre', 'Post']
    paradigm_names = ['P_and_K']
    for location in locations:

        for timing in timings:
            for i, protocol in enumerate(protocols):
                print(protocol)
                text = mp.read_file(protocol)
                #find pulseFreq
HookUp {prestim} {Protocol} {Timing} {stimcomp} {diskpath} {numAP} {inject} {AP_durtime} {APinterval} {ISI} {pulseFreq} {pulses} {burstFreq} {numbursts} {newTrainFreq} 1 {jitter_int}
reset
step 1.5 -time

fileFLUSH {Vmfile} 
fileFLUSH {Cafile} 
fileFLUSH {Gkfile} 
fileFLUSH {spinefile}
fileFLUSH {somainjfile}
'''
if __name__ == '__main__':

    for delay in [0.04]:
        mp.change_in_file(synparams_file,'GABAdelay = ',delay)

        params = mp.read_file('SimParams.g')
        gabaYesNo = mp.find_value(params,'GABAYesNo','Pre')
        spines = mp.find_string(params,'whichSpines','Pre')
        stim_start = mp.find_value(params,'initSim','Pre')
        too_fast = mp.find_value(params,'TooFast','Pre')
        print gabaYesNo, spines, stim_start, too_fast
        protocols = ['InOut/Fino.g']#,'InOut/1_AP.g']
        timings = ['Pre','Post']
        paradigm_names = ['Fino']#,'1_AP']
        for timing in timings:
            for i, protocol in enumerate(protocols):
                text = mp.read_file(protocol)
                #find pulseFreq
                freq = mp.find_value(text, 'pulseFreq',timing)
                npulses = mp.find_value(text, 'pulses',timing)     
                nbursts = mp.find_value(text, 'numbursts',timing)