n2 = np.zeros([vc.d2.pt, vc.d3.pt]) Ineq = np.zeros([vc.d2.pt, vc.d3.pt]) for ii in range(vc.d2.pt): for jj in range(vc.d3.pt): a = 1.0 CovM = createCovMat(vc, vc2, ii, jj) CovM, phase = rot_phase(CovM) N = get_LogNegNum(CovM) Nsq, Ineq[ii, jj], n1[ii, jj], n2[ii, jj] = get_sqIneq(vc, CovM) a = 1.0 LnM[ii, jj] = N * a LnM2[ii, jj] = Nsq * a return LnM, LnM2, Ineq, n1, n2 fname = '1150_' vc = sn.variable_carrier() vc.resultfolder = fname+'//' folder = '/Volumes/QDP-Backup-2/BenS/DCE2015-16/data_May20/' vc.fifolder = folder vc.snr = 4.5 vc.cpt = 5 vc.LP = 0.0 vc.T = 0.007 vc.Tn1 = 3.9 vc.Tn2 = 4.6 vc.G1 = 6.45e9 vc.G2 = 7.5e9 vc.f1 = 4.8e9 vc.f2 = 4.1e9 vc.Ravg = 0.0 # 69.7 # if set to 0.0 script will use differential resistance vc.B = 1e5
import numpy as np from scipy.constants import h, e from scipy.constants import Boltzmann as kB import SNfit2 as SNfit # SNfit (traditionally) & SNfit2 (for hybrid coupler) # import PyGnuplot as gp vc = SNfit.variable_carrier() vc.fifolder = '' vc.LP = 1.0 vc.Texp = 0.009 SNR = 4.0 f1 = 4.8e9 f2 = 4.8e9 vc.Ravg = 0.0 # 69.7 vc.B = 1e5 vc.resultfolder = 'f2//' pathf1 = '/Volumes/QDP-Backup-2/BenS/DCE2015-16/data_Jul15/1206_SN22_1/' savename = '1150_LogN.mtx' savename2 = '1150_ineqSq.mtx' vc.fifolder = '' vc.filein1 = pathf1 + '1206_SN22_1ON//1206_SN22_1CovMat_cI1I1.mtx' vc.filein2 = pathf1 + '1206_SN22_1ON//1206_SN22_1CovMat_cQ1Q1.mtx' vc.filein3 = pathf1 + '1206_SN22_1ON//1206_SN22_1CovMat_cI2I2.mtx' vc.filein4 = pathf1 + '1206_SN22_1ON//1206_SN22_1CovMat_cQ2Q2.mtx' vc.filein6 = pathf1 + '1206_SN22_1ON//1206_SN22_1CovMat_cI1I2.mtx' vc.filein7 = pathf1 + '1206_SN22_1ON//1206_SN22_1CovMat_cI1Q2.mtx' vc.filein8 = pathf1 + '1206_SN22_1ON//1206_SN22_1CovMat_cQ1I2.mtx' vc.filein9 = pathf1 + '1206_SN22_1ON//1206_SN22_1CovMat_cQ1Q2.mtx' vc.filein10 = pathf1 + '1206_SN22_1ON//1206_SN22_1CovMat_cI1Q1.mtx' vc.filein11 = pathf1 + '1206_SN22_1ON//1206_SN22_1CovMat_cI2Q2.mtx'