tn = np.max([len(j_di_rate_array[ii]),1]) temp_rate_vec = np.zeros([tn]) temp_I_di_vec = np.zeros([tn]) for jj in range(len(j_di_rate_array[ii])): temp_rate_vec[jj] = 1e-6*j_di_rate_array[ii][jj] # master_rate_array has units of fluxons per microsecond temp_I_di_vec[jj] = 1e6*( I_di_array[ii][jj]+I_di_array[ii][jj+1] )/2 # this makes I_di_array__scaled have the same dimensions as j_di_rate_array and units of uA master_rate_array.append([]) master_rate_array[ii+1] = np.append(temp_rate_vec,0) # this zero added so that a current that rounds to I_di + I_di_pad will give zero rate I_di_array__scaled.append([]) I_di_array__scaled[ii+1] = np.append(temp_I_di_vec,np.max(temp_I_di_vec)+I_di_pad) # this additional I_di + I_di_pad is included so that a current that rounds to I_di + I_di_pad will give zero rate # plot the rate array if plot_rate_arrays == True: plot_dend_rate_array__norm_to_phi0(I_di_array = I_di_array__scaled, I_drive_list = I_drive_list, influx_list = influx_list, master_rate_array = master_rate_array, L_left = L_left_list[pp], I_de = I_de_list[qq]) # plot_dend_rate_array(I_di_array = I_di_array__scaled, I_drive_list = I_drive_list, influx_list = influx_list, master_rate_array = master_rate_array, L_left = L_left_list[pp], I_de = I_de_list[qq]) # save data save_string = 'master_dnd_rate_array_{:1d}jj_Llft{:05.2f}_Lrgt{:05.2f}_Ide{:05.2f}'.format(num_jjs,L_left_list[pp],L_right_list[pp],I_de_list[qq]) data_array = dict() data_array['rate_array'] = master_rate_array data_array['I_drive_list'] = I_drive_list data_array['influx_list'] = influx_list data_array['I_di_array'] = I_di_array__scaled print('\n\nsaving session data ...\n\n') # save_session_data(data_array,save_string) save_session_data(data_array,save_string+'.soen',False) #%% just plot
fig_sat.suptitle('DI loop saturation; num_jjs = {}'.format(num_jjs)) Phi_th_vec = np.zeros([len(I_de_vec)]) for ii in range(len(I_de_vec)): I_de = I_de_vec[ii] file_name = 'master_dnd_rate_array_{:1d}jj_Llft{:05.2f}_Lrgt{:05.2f}_Ide{:05.2f}.soen'.format( num_jjs, L_left, L_right, I_de) with open('../_circuit_data/' + file_name, 'rb') as data_file: data_array = pickle.load(data_file) rate_array = data_array['rate_array'] influx_list = data_array['influx_list'] I_di_array = data_array['I_di_array'] # 3D plot of rate array if do__3d_rate_arrays == True: plot_dend_rate_array__norm_to_phi0(file_name=file_name) # plot_dend_rate_array(file_name = file_name) # squid response curves of rate vs applied flux for I_di = 0 if do__squid_response == True: rate_vec__temp = np.zeros([len(influx_list)]) for qq in range(len(influx_list)): rate_vec__temp[qq] = rate_array[qq][1] rate_vec__temp = np.insert(np.insert(rate_vec__temp, 0, 0), 0, 0) influx_list__2 = copy.deepcopy(influx_list) influx_list__2.insert(0, influx_list__2[0]) influx_list__2.insert(0, 0) ax_sq = fig_sq.gca() ax_sq.plot( 1e-18 * np.asarray(influx_list__2) / p['Phi0'],
# print(temp_rate_vec) master_rate_array[ii + 1] = np.append( temp_rate_vec, 0 ) # this zero added so that a current that rounds to I_di + I_di_pad will give zero rate I_di_array__scaled.append([]) I_di_array__scaled[ii + 1] = np.append( temp_I_di_vec, np.max(temp_I_di_vec) + I_di_pad ) # this additional I_di + I_di_pad is included so that a current that rounds to I_di + I_di_pad will give zero rate # plot the rate array if plot_rate_arrays == True: # plot_dend_rate_array__norm_to_phi0(I_di_array = I_di_array__scaled, influx_list = Phi_a_vec, master_rate_array = master_rate_array, Ib = Ib, Phi_p = Phi_p) plot_dend_rate_array__norm_to_phi0( I_di_array=I_di_array__scaled, influx_list=Phi_ex_vec, master_rate_array=master_rate_array, Ib=Ib, Phi_p=Phi_p) # plot_dend_rate_array(I_di_array = I_di_array__scaled, I_drive_list = I_drive_list, influx_list = influx_list, master_rate_array = master_rate_array, L_left = L_left_list[pp], I_de = I_de_list[qq]) # save data save_string = 'master_dnd_rate_array_3jj_Ib{:06.2f}uA_Lp{:05.2f}pH_Ip{:09.6f}uA_Ldi{:07.2f}nH_dt{:04.1f}ps_dsf{:d}'.format( Ib, Lp, Ip, Ldi, dt, downsample_factor) data_array = dict() data_array['rate_array'] = master_rate_array data_array['influx_list'] = influx_list data_array['I_di_array'] = I_di_array__scaled print('\n\nsaving session data ...\n\n') # save_session_data(data_array,save_string) save_session_data(data_array, save_string + '.soen', False)