def ask_overwrite(self): ask_overwrite(self._folder+self._filen_1)
#for the VNA I want 4 data files for Real, Imag, MAG, Phase filen_1 = filen_0 + '_real' + '.mtx' filen_2 = filen_0 + '_imag' + '.mtx' filen_3 = filen_0 + '_mag' + '.mtx' filen_4 = filen_0 + '_phase' + '.mtx' head_1 = make_header(dim_1, dim_2, dim_3, 'S21 _real') head_2 = make_header(dim_1, dim_2, dim_3, 'S21 _imag') head_3 = make_header(dim_1, dim_2, dim_3, 'S21 _mag') head_4 = make_header(dim_1, dim_2, dim_3, 'S21 _phase') matrix3d_1 = np.zeros((dim_3.pt, dim_2.pt, dim_1.pt)) matrix3d_2 = np.zeros((dim_3.pt, dim_2.pt, dim_1.pt)) matrix3d_3 = np.zeros((dim_3.pt, dim_2.pt, dim_1.pt)) matrix3d_4 = np.zeros((dim_3.pt, dim_2.pt, dim_1.pt)) ask_overwrite(folder+filen_1) copy_file(thisfile, filen_0, folder) #backup this script dim_1.lin = np.linspace(dim_1.start,dim_1.stop,dim_1.pt) dim_2.lin = np.linspace(dim_2.start,dim_2.stop,dim_2.pt) dim_3.lin = np.linspace(dim_3.start,dim_3.stop,dim_3.pt) print 'Executing sweep' print 'req time (h):'+str(dim_3.pt*dim_2.pt*dim_1.sweeptime/3600) t0 = time() try: for kk in range(dim_3.pt): dim_3val = dim_3.lin[kk] dim_3.set_freq_cw(dim_3val) #sleep(5.2)