def b_vec_fun_no_a(b_vec, binval, delmval, p): bval = b_vec[0] + 1j * b_vec[1] Omega = p['Omega'] rho = np.array( rho_broad_full(0, bval, 0, delmval, find_dressed_states_m, p)) p['Omega'] = 0 rho_no_pump = np.array( rho_broad_full(0, bval, 0, delmval, find_dressed_states_m, p)) p['Omega'] = Omega #S12val=rho[1,0]*p['Nm']*p['gm'] S12val = rho[2, 1] * p['No'] * p['gm'] + rho_no_pump[2, 1] * ( p['Nm'] - p['No']) * p['gm'] bval1 = (-1j * S12val + np.sqrt(p['gammamc']) * binval) / ( (p['gammamc'] + p['gammami']) / 2 - 1j * delmval) return [bval1.real, bval1.imag] - b_vec
def S12_4(Bval, bval, delmval, p): p['No'] = p['No_total'] p['Nm'] = p['Nm_total'] omegaao = omegaao4_from_I(B_val, p) p['sd_delao'] = sd_delao4_from_I(B_val, p) p['mean_delao'] = deltaao_from_I(B_val, omegaao, p) p['mean_delam'] = deltamac_from_I(B_val, p) p['nbath'] = nbath_from_T(T, p, p['mean_delam']) p['Omega'] = Omega_from_PdBm(P_pump, p) rho = np.array( rho_broad_full(0, bval, 0, delmval, find_dressed_states_m, p)) p['Omega'] = 0 rho_no_pump = np.array( rho_broad_full(0, bval, 0, delmval, find_dressed_states_m, p)) return rho[2, 1] * p['No'] * p['gm'] + rho_no_pump[2, 1] * ( p['Nm'] - p['No']) * p['gm']
def S12_1(B_val, bval, delmval, p): p['No'] = p['No_total'] / (np.exp(B_val * p['Gg'] * 6.63e-34 / (1.38e-23 * T)) - 1) p['Nm'] = p['Nm_total'] / (np.exp(B_val * p['Gg'] * 6.63e-34 / (1.38e-23 * T)) - 1) omegaao = omegaao1_from_I(B_val, p) p['sd_delao'] = sd_delao1_from_I(B_val, p) p['mean_delao'] = deltaao_from_I(B_val, omegaao, p) p['mean_delam'] = deltamac_from_I(B_val, p) p['nbath'] = nbath_from_T(T, p, deltamacval=p['mean_delam']) p['Omega'] = Omega_from_PdBm(P_pump, p) rho = np.array( rho_broad_full(0, bval, 0, delmval, find_dressed_states_m, p)) p['Omega'] = 0 rho_no_pump = np.array( rho_broad_full(0, bval, 0, delmval, find_dressed_states_m, p)) return rho[2, 1] * p['No'] * p['gm'] + rho_no_pump[2, 1] * ( p['Nm'] - p['No']) * p['gm']
#start_guess_vec_bout=[boutvals[ii,jj-1].real,boutvals[ii,jj-1].imag] start_guess_vec_b = [bvals[0, jj - 1].real, bvals[0, jj - 1].imag] #start_guess_vec_b2=[bvals2[ii,jj-1].real,bvals2[ii,jj-1].imag,avals[ii,jj-1].real,avals[ii,jj-1].imag] elif jj == 0: start_guess_vec_b = [bvals[ii - 1, 0].real, bvals[ii - 1, 0].imag] else: start_guess_complex_b = (bvals[ii, jj - 1] + bvals[ii - 1, jj]) / 2 start_guess_vec_b = [ start_guess_complex_b.real, start_guess_complex_b.imag ] # for pkey in p: # print(pkey +' = '+str(type(p[pkey]))) #print(type(binval)) #print(type(deltamval)) bvals[ii, jj] = find_b_no_a(binval, deltamval, p, start_guess_vec_b) rho_out[:, :, ii, jj] = rho_broad_full(0, bvals[ii, jj], 0, deltamval, find_dressed_states_m, p) calc_time[ii, jj] = time.time() - time1 elapsed_time = time.time() - start_time print(' ' + filename + ': ' + str(ii) + ', Time: ' + time.ctime() + ', Elapsed: ' + str(elapsed_time)) np.savez(filename, binvals=binvals, B_vals=B_vals, deltamvals=deltamvals, p=p, bvals=bvals, rho_out=rho_out, P_pump=P_pump, P_mu=P_mu, T=T, elapsed_time=elapsed_time,
start_guess_vec_b) #rho_out_b[:,:,ii,jj]=S12_2(B_val,bvals[ii,jj],deltamval,p)#+S12_2(B_val,bvals[ii,jj],deltamval,p)+S12_3(B_val,bvals[ii,jj],deltamval,p)+S12_4(B_val,bvals[ii,jj],deltamval,p) p['No'] = p['No_total'] / (np.exp(B_val * p['Gg'] * 6.63e-34 / (1.38e-23 * T)) - 1) p['Nm'] = p['Nm_total'] / (np.exp(B_val * p['Gg'] * 6.63e-34 / (1.38e-23 * T)) - 1) omegaao = omegaao1_from_I(B_val, p) p['sd_delao'] = sd_delao1_from_I(B_val, p) p['mean_delao'] = deltaao_from_I(B_val, omegaao, p) p['mean_delam'] = deltamac_from_I(B_val, p) p['nbath'] = nbath_from_T(T, p, deltamacval=p['mean_delam']) p['Omega'] = Omega_from_PdBm(P_pump, p) #bvals[ii,jj]=find_b_no_a(binval,deltamval,p,start_guess_vec_b) rho_out_b[:, :, ii, jj] = np.array( rho_broad_full( 0, bvals[ii, jj], 0, deltamval, find_dressed_states_m, p)) * p['No_total'] / (np.exp(B_val * p['Gg'] * 6.63e-34 / (1.38e-23 * T)) - 1) p['No'] = p['No_total'] / (np.exp(B_val * p['Gg'] * 6.63e-34 / (1.38e-23 * T)) - 1) p['Nm'] = p['Nm_total'] / (np.exp(B_val * p['Gg'] * 6.63e-34 / (1.38e-23 * T)) - 1) omegaao = omegaao2_from_I(B_val, p) p['sd_delao'] = sd_delao2_from_I(B_val, p) p['mean_delao'] = deltaao_from_I(B_val, omegaao, p) p['mean_delam'] = deltamac_from_I(B_val, p) p['nbath'] = nbath_from_T(T, p, p['mean_delam']) p['Omega'] = Omega_from_PdBm(P_pump, p) rho_out_b[:, :, ii, jj] = rho_out_b[:, :, ii, jj] + np.array(