Esempio n. 1
0
ax_bw = fig2.add_subplot(2, 3, 3)
ax_cost = fig2.add_subplot(2, 3, 6)
ax_Z_V_low = fig2.add_subplot(2, 3, 2)
ax_Z_V_medium = fig2.add_subplot(2, 3, 5)

###### CONTINUOUS ACROSS VOLTAGES
Vr = arange(-70.0, -30.0, 0.5)
Z_array = zeros(len(Vr))
Z_fixed_array = zeros(len(Vr))
total_resistance_array = zeros_like(Vr)
total_K_conductance = zeros_like(Vr)
for i, V in enumerate(Vr):  #Impedances at lowest frequency
    if depolarise_with_light:
        DepolarisePhotoreceptor.WithLight(HH, V)
    else:
        DepolarisePhotoreceptor.WithCurrent(HH, V)
    Z_array[i] = abs(HH.body.impedance(f_low))
    Experiment.freeze_conductances(HH)
    Z_fixed_array[i] = abs(HH.body.impedance(f_low))
    Experiment.unfreeze_conductances(HH)
    total_resistance_array[i] = HH.body.resistance()
    total_K_conductance[i] = HH.body.total_K_conductance()

ax_Z_V_low.plot(Vr,
                Z_array / 1000,
                'k',
                linewidth=2,
                label="Fixed conductances")
ax_Z_V_low.plot(Vr,
                Z_fixed_array / 1000,
                'k--',
Esempio n. 2
0
fig2 = figure(6, figsize=[9, 5])
ax_Z = fig2.add_subplot(1, 2, 1)
ax_cost = fig2.add_subplot(2, 2, 4)
ax_R_0 = fig2.add_subplot(2, 2, 2)

###### CONTINUOUS ACROSS VOLTAGES
Vr = arange(-60.0, -35.0, 0.5)
Z_array = zeros(len(Vr))
Z_fixed_array = zeros(len(Vr))
total_resistance_array = zeros_like(Vr)
total_K_conductance = zeros_like(Vr)
for i, V in enumerate(Vr):  #Impedances at lowest frequency
    if depolarise_with_light:
        DepolarisePhotoreceptor.WithLight(HH, V)
    else:
        DepolarisePhotoreceptor.WithCurrent(HH, V)
    total_resistance_array[i] = HH.body.resistance()
    total_K_conductance[i] = HH.body.total_K_conductance()

ax_R_0.plot(Vr,
            total_resistance_array / 1000,
            'k--',
            linewidth=2,
            label="Non-fixed conductances")

### ONLY CERTAIN VOLTAGES BUT CONTINUOUS ACROSS FREQUENCIES

Vr = array([-60, -52, -44, -37])
delta_f = 0.1
f = arange(1.5, 900, delta_f)
f_from_medium = arange(f_medium, 500, 1)