Beispiel #1
0
from analysis.lib.lde import tail_cts_per_shot_v4


def find_nearest(array, value):
    idx = (abs(array - value)).argmin()
    return idx


d = numpy.loadtxt(
    r'D:\measuring\data\LDE\analysis_data\opt_rabi_vs_CR\2012-10-24-CRvsRabi_LT1\183600_rabi_vs_cr\pulseshape_50ns_250nW.txt',
    skiprows=10)

counts0 = d[:, 0]
counts1 = d[:, 1]

counts_rebin0 = tail_cts_per_shot_v4.rebin(counts0, 4)
counts_rebin1 = tail_cts_per_shot_v4.rebin(counts1, 4)

time_ax = arange(len(counts_rebin0)) * 4 * 0.128

fit_min = 58.0  #ns
fit_max = 100.0  #ns

idx_min = find_nearest(time_ax, fit_min)
idx_max = find_nearest(time_ax, fit_max)

fig = plt.figure()

plt.plot(time_ax, counts_rebin1, 'bo')

plt.xlabel('time (ns)')
# we assume that at the pulse begin the population should be 1 
# i think this means assuming infinetely sharp pulses

LT1_pulse_start = 30.6
LT2_pulse_start = 4.8

LT1_params = LT1_data[0]['fit_result'][0]['params_dict']
LT2_params = LT2_data[0]['fit_result'][0]['params_dict']

norm_amp_LT1 = LT1_params['a'] + LT1_params['b']*(LT1_pulse_start-LT1_params['x0'])+\
        np.abs(LT1_params['A']) * np.exp(-(LT1_pulse_start-LT1_params['x0'])/LT1_params['tau'])

norm_amp_LT2 = LT2_params['a'] + LT2_params['b']*(LT2_pulse_start-LT2_params['x0'])+\
        np.abs(LT2_params['A']) * np.exp(-(LT2_pulse_start-LT2_params['x0'])/LT2_params['tau'])

LT1_counts = tail_cts_per_shot_v4.rebin(LT1_data[0]['counts'],rebins)/(norm_amp_LT1*rebins)
LT1_time = np.arange(len(LT1_counts))*0.128*rebins-26
LT1_fit = tail_cts_per_shot_v4.rebin(LT1_data[0]['fit_result'][0]['fitdata'],rebins)/(norm_amp_LT1*rebins)
LT1_fit_time = np.arange(len(LT1_fit))*0.128*rebins+LT1_data[0]['time_fit'][0]-26


idx_LT1_min = find_nearest(LT1_time,x_range[0])
idx_LT1_max = find_nearest(LT1_time,x_range[1])


LT2_counts = tail_cts_per_shot_v4.rebin(LT2_data[0]['counts'],rebins)/(norm_amp_LT2*rebins)
LT2_time = np.arange(len(LT2_counts))*0.128*rebins
LT2_fit = tail_cts_per_shot_v4.rebin(LT2_data[0]['fit_result'][0]['fitdata'],rebins)/(norm_amp_LT2*rebins)
LT2_fit_time = np.arange(len(LT2_fit))*0.128*rebins+LT2_data[0]['time_fit'][0]

Beispiel #3
0
from analysis.lib.lde import tail_cts_per_shot_v4

def find_nearest(array,value):
    idx=(abs(array-value)).argmin()
    return idx


d=numpy.loadtxt(r'D:\measuring\data\LDE\analysis_data\opt_rabi_vs_CR\2012-10-24-CRvsRabi_LT1\183600_rabi_vs_cr\pulseshape_50ns_250nW.txt', skiprows = 10)

counts0=d[:,0]
counts1=d[:,1]


counts_rebin0=tail_cts_per_shot_v4.rebin(counts0,4)
counts_rebin1=tail_cts_per_shot_v4.rebin(counts1,4)

time_ax = arange(len(counts_rebin0))*4*0.128

fit_min = 58.0 #ns
fit_max = 100.0 #ns

idx_min = find_nearest(time_ax,fit_min)
idx_max = find_nearest(time_ax,fit_max)

fig=plt.figure()

plt.plot(time_ax,counts_rebin1,'bo')

plt.xlabel('time (ns)')
plt.ylabel('counts')
plt.title('pulse shape')