Пример #1
0
gain_bandwidth_product_fixed = zeros_like(Vr)

HH_RC = []

for i, V in enumerate(Vr):

    label_str = str(V) + ' mV'

    DepolarisePhotoreceptor.WithLight(HH, V)

    gain_max[i], Bandwidth[i] = Gain_Bandwidth(HH.body.voltage_contrast_gain,
                                               f_min=f_medium)
    gain = abs(HH.body.voltage_contrast_gain(f))
    gain_bandwidth_product[i] = gain_max[i] * Bandwidth[i]

    Experiment.freeze_conductances(HH)

    gain_max_fixed[i], Bandwidth_fixed[i] = Gain_Bandwidth(
        HH.body.voltage_contrast_gain, f_min=f_medium)
    gain_fixed = abs(HH.body.voltage_contrast_gain(f))
    gain_bandwidth_product_fixed[i] = gain_max_fixed[i] * Bandwidth_fixed[i]

    Experiment.unfreeze_conductances(HH)

    ax_bwprod.plot(V,
                   gain_bandwidth_product[i],
                   colour_graph[i] + '.',
                   markersize=15)
    ax_bwprod.plot(V,
                   gain_bandwidth_product_fixed[i],
                   colour_graph[i] + '.',
Пример #2
0
    for i, t in enumerate(time_array):
        if 10 <= t <= 110: I[i] = 1e-3*(a+b*ii)  # nA->uA  --- Fig S1b
    DepolarisePhotoreceptor.WithLight(photoreceptor, V = V_membrane)

    V_array, g_Ch = Experiment.inject_current(photoreceptor,I,dt)
    plt.ylabel_set = False
    ax = plt.subplot(2,1,1)
    ax.plot(time_array, V_array,color='black') #mV
    ax.set_title('Hodgkin-Huxley voltage (top) and conductances (bottom)')
    plt.ylabel('Potential (mV)')
    ax.set_xticklabels([])
    ax = plt.subplot(2,1,2)
    ax.plot(time_array, g_Ch[0]*1e6,color='blue') #Fast conductance, nS
    ax.plot(time_array, g_Ch[1]*1e6,color='red') #Slow conductance, nS
    plt.xlabel('Time (msec)')
    plt.ylabel('Conductances (nS)')

    Experiment.freeze_conductances(photoreceptor)

    V_array, g_Ch = Experiment.inject_current(photoreceptor,I,dt)
    ax = plt.subplot(2,1,1)
    ax.plot(time_array, V_array,'k--') #mV
    ax.set_xticklabels([])
    ax = plt.subplot(2,1,2)
    ax.plot(time_array, g_Ch[0]*1e6,'b--') #Fast conductance, nS
    ax.plot(time_array, g_Ch[1]*1e6,'r--') #Slow conductance, nS

    Experiment.unfreeze_conductances(photoreceptor)


plt.show()
Пример #3
0
I = zeros_like(time_array)

for ii,V_membrane in enumerate(V_membrane_) :
    for i, t in enumerate(time_array):
        if 10 <= t <= 160: I[i] = 1e-3*(0.01)  # nA->uA
    DepolarisePhotoreceptor.WithLight(drosophila, V = V_membrane)

    V_array, g_Ch = Experiment.inject_current(drosophila,I,dt)
    ax = fig1.add_subplot(3,1,ii+1)
    ax.plot(time_array, V_array,color='black') #mV

    #Experiment.unfreeze_conductances(drosophila)

    DepolarisePhotoreceptor.WithLight(drosophila, V = V_membrane) #To make sure that all channels are back at rest

    Experiment.freeze_inactivations(drosophila)
    V_array, g_Ch = Experiment.inject_current(drosophila,I,dt)
    Experiment.unfreeze_inactivations(drosophila)
    ax.plot(time_array, V_array,'k:') #mV

    DepolarisePhotoreceptor.WithLight(drosophila, V = V_membrane) #To make sure that all channels are back at rest

    Experiment.freeze_conductances(drosophila)
    V_array, g_Ch = Experiment.inject_current(drosophila,I,dt)
    Experiment.unfreeze_conductances(drosophila)
    ax.plot(time_array, V_array,'k--') #mV

    ax.set_ylim(plot_window + V_membrane)

show()
Пример #4
0
                    ha='right')

Vr = np.arange(-68.0, -30.0, 8)
deltaV = 0.5
Vr_continuous = np.arange(-68, -36 + deltaV, deltaV)

colour_graph = list('ybgrc')

GBWP_continuous_ = np.zeros_like(Vr_continuous)
GBWP_RC_continuous_ = np.zeros_like(Vr_continuous)
GBWP_selective_continuous_ = np.zeros((3, len(Vr_continuous)))

for i, V in enumerate(Vr_continuous):
    DepolarisePhotoreceptor.WithLight(HH, V)
    GBWP_continuous_[i] = GBWP(HH.body.impedance, f_min=f_medium)
    Experiment.freeze_conductances(HH)
    GBWP_RC_continuous_[i] = GBWP(HH.body.impedance, f_min=f_medium)
    Experiment.unfreeze_conductances(HH)

    for ii in range(3):
        for iii in range(3):
            if ii != iii:
                Experiment.freeze_conductances(HH, index=iii)
        GBWP_selective_continuous_[ii, i] = GBWP(HH.body.impedance,
                                                 f_min=f_medium)
        Experiment.unfreeze_conductances(HH)

for ii in range(3):
    ax_GBWP[ii].plot(Vr_continuous,
                     GBWP_continuous_ / 1e3,
                     'k',
Пример #5
0
DepolarisePhotoreceptor.WithLight(HH,V)
passive_gbwp = 1/2/pi/HH.body.C
tau_fast_original = HH.body.voltage_channels[0].m_time(V)
print("Passive GBWP is ", passive_gbwp, " MOhm Hz")
print("Original time constant for FDR is ", tau_fast_original, "ms")

low_pass_found = False
for i,tau in enumerate(tau_fast):
    HH.body.voltage_channels[0].time_multiplier = tau_fast[i]/tau_fast_original
    GBWP_a[i]= GBWP(HH.body.impedance)/passive_gbwp
    GDV_a[i] = GDV(HH.body.impedance, f_down=f_down)
    if (Is_Band_Pass(HH.body.impedance) and low_pass_found==False):
        print ("First low pass when tau = ", tau)
        low_pass_found = True

Experiment.freeze_conductances(HH,index=1) #freeze SDR

low_pass_found = False
for i,tau in enumerate(tau_fast):
    HH.body.voltage_channels[0].time_multiplier = tau_fast[i]/tau_fast_original
    GBWPf_a[i]= GBWP(HH.body.impedance)/passive_gbwp
    GDVf_a[i] = GDV(HH.body.impedance, f_down=f_down)
    if (Is_Band_Pass(HH.body.impedance) and low_pass_found==False):
        print ("First low pass when tau = ", tau)
        low_pass_found = True


Experiment.freeze_conductances(HH,index=0) #freeze FDR and SDR
passive_gdv = GDV(HH.body.impedance)

ax_gbwp1.plot(tau_fast,GBWP_a,'k')