all_tau = np.zeros((0, 14)) all_tau_err = np.zeros((0, 14)) for path in paths: files = [f for f in os.listdir(path) if f[:1] != '.' and f[-4:] == '.txt'] tau_list = [] tau_err_list = [] fR_list = [] fR_err_list = [] CR = [] for i in files: print i fR, fR_err, tau, tau_err = tail_cts_per_shot_v4.optical_rabi_resonant_fit_hannes( os.path.join(path, i), 34, 61, use_channel=0, binsize=0.128) tau_list.append(tau) tau_err_list.append(tau_err) fR_list.append(fR * 1e3) fR_err_list.append(fR_err * 1e3) CR.append(float(i[:2])) fig = plt.figure() plt.errorbar(CR, tau_list, yerr=tau_err_list, fmt='ro') plt.xlabel('CR threshold') plt.ylabel('Decay time [ns]') plt.title(path) fig.savefig(os.path.join(path, 'CRvsTau.png')) fig2 = plt.figure() plt.errorbar(CR, fR_list, yerr=fR_err_list, fmt='ro')
r'1609H_0806_lp.txt', r'1608H_1814_lp.txt', #r'1617H_1814_lp.txt', r'1617H_3023_lp.txt' ] CR_lp = [1,2,4,8,18,30] tau_lp=[] tau_lp_err=[] fR_lp=[] fR_lp_err=[] for i in files_hp_long: print i file_name = os.path.join(data_folder,i) fR, fR_err, tau, tau_err = tail_cts_per_shot_v4.optical_rabi_resonant_fit_hannes(file_name, 5,33, use_channel=1, binsize=0.128, rebins = 4) tau_long_hp.append(tau) tau_long_hp_err.append(tau_err) fR_long_hp.append(fR) fR_long_hp_err.append(fR_err) #plt.close('all') fig=plt.figure() plt.errorbar(CR_hp_long,tau_long_hp,yerr=tau_long_hp_err,fmt='ro') plt.xlabel('CR threshold') plt.ylabel('Decay time [ns]') plt.title('decay time vs CR threshold high power (ca. 200 MHz rabi f)') for f in files_lp: print f
all_tau = np.zeros((0,14)) all_tau_err = np.zeros((0,14)) for path in paths: files = [ f for f in os.listdir(path) if f[:1] != '.' and f[-4:] == '.txt' ] tau_list=[] tau_err_list=[] fR_list=[] fR_err_list=[] CR=[] for i in files: print i fR, fR_err, tau, tau_err = tail_cts_per_shot_v4.optical_rabi_resonant_fit_hannes( os.path.join(path,i),34,61, use_channel=0, binsize=0.128) tau_list.append(tau) tau_err_list.append(tau_err) fR_list.append(fR*1e3) fR_err_list.append(fR_err*1e3) CR.append(float(i[:2])) fig=plt.figure() plt.errorbar(CR,tau_list,yerr=tau_err_list,fmt='ro') plt.xlabel('CR threshold') plt.ylabel('Decay time [ns]') plt.title(path) fig.savefig(os.path.join(path,'CRvsTau.png'))