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()
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] + '.', markersize=15) if V > V_rest: ax_RC_gain.loglog(f, gain, colour_graph[i], linewidth=2,
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()