Example #1
0
def restriction_3(msn_rate, gpe_rate, stn_rate, n_msn, n_gpe, x, neuron_model,
                  syn_models, n_exp):
    # 3. 30 Hz normal, GPe at 30 Hz, STN at 10 Hz
    c, w = x
    target_rate3 = 30.0

    SNR_list = simulate_basa_line_SNr_multiple(
        msn_rate,
        gpe_rate,
        stn_rate,
        n_msn,
        n_gpe,
        n_stn,
        neuron_model,
        syn_models,
        c,  # This is the current to add to I_e base
        sim_time,
        8,
        w_STN_SNR=w,
        seed=n_exp,
        record_vm=True,
        n_neurons=n_exp)
    r_SNR = []
    for SNR in SNR_list:
        r_SNR.append(SNR.signals['spikes'].mean_rate(1000, sim_time))

    r = numpy.array(r_SNR)
    mr = numpy.mean(r, axis=0)
    std = numpy.std(r, axis=0)
    e = mr - target_rate3

    #Normalize error
    e = e / target_rate3

    return SNR_list[0], mr, std, e
def restriction_1(msn_rate,
                  gpe_rate,
                  stn_rate_ch,
                  n_msn,
                  n_gpe,
                  x,
                  neuron_model,
                  syn_models,
                  n_exp,
                  record_vm=True):
    # 1. With no GPe input (still with MSN input) and STN at 10 Hz (since in the
    #    experiment the firing rate of STN were not recorded we can not know if it
    #    was increased or not/and to what spatial extend, could be that SNr recieves
    #    increased input due to increased STN. However fitting with constatn
    #    synapses STN to SNr makes it difficult the hit the target rates) to  are silent) the fire at
    #    312 % if baseline (30*3=90 Hz)s. REMARK: If STN at 20 then to be able to
    #    to come close to restriction STN needs to be depressing onto SNr
    c, w = x
    target_rate1 = 30 * 3.12
    n_gpe_ch = 0
    #stn_rate_ch=20.0
    SNR_list = simulate_basa_line_SNr_multiple(
        msn_rate,
        gpe_rate,
        stn_rate_ch,
        n_msn,
        n_gpe_ch,
        n_stn,
        neuron_model,
        syn_models,
        c,  # This is the current to add to I_e base
        sim_time,
        8,
        w_STN_SNR=w,
        seed=n_exp,
        record_vm=record_vm,
        n_neurons=n_exp)

    r_SNR = []
    for SNR in SNR_list:
        r_SNR.append(SNR.signals['spikes'].mean_rate(1000, sim_time))

    r = numpy.array(r_SNR)
    mr = numpy.mean(r, axis=0)
    std = numpy.std(r, axis=0)
    e = mr - target_rate1

    #Normalize error
    e = e / target_rate1

    return SNR_list[0], mr, std, e
def restriction_2(msn_rate,
                  gpe_rate,
                  stn_rate,
                  n_msn,
                  n_gpe,
                  x,
                  neuron_model,
                  syn_models,
                  n_exp,
                  record_vm=True):
    # 2. 15 Hz without STN. OBS Since stn is of the GPE should fire at 15 Hz
    c, w = x
    target_rate2 = 15.0
    stn_rate_ch = 0.
    gpe_rate_ch = 15.0  # Since stn is of the GPE should fire at 15 Hz
    r_SNR = []

    SNR_list = simulate_basa_line_SNr_multiple(
        msn_rate,
        gpe_rate_ch,
        stn_rate_ch,
        n_msn,
        n_gpe,
        n_stn,
        neuron_model,
        syn_models,
        c,  # This is the current to add to I_e base
        sim_time,
        8,
        w_STN_SNR=w,
        seed=n_exp,
        record_vm=record_vm,
        n_neurons=n_exp)
    r_SNR = []
    for SNR in SNR_list:
        r_SNR.append(SNR.signals['spikes'].mean_rate(1000, sim_time))

    r = numpy.array(r_SNR)
    mr = numpy.mean(r, axis=0)
    std = numpy.std(r, axis=0)
    e = mr - target_rate2

    #Normalize error
    e = e / target_rate2

    return SNR_list[0], mr, std, e