Commit 43e79d32 by alexander.dornheim

### Cleaned up some print commands for testing

parent 6b0228d2
 ... ... @@ -123,7 +123,6 @@ def Resize(A, Mnew,Nnew): Mstep = int(M/Mnew); countN = -1; print(Nstep); for j in range(0,N,Nstep): countN = countN+1; countM = -1; ... ...
 ... ... @@ -41,9 +41,6 @@ def JWST_data_processor(config): Xi_A = np.fromfile(fid, dtype='
 ... ... @@ -158,7 +158,6 @@ class Phase(Problem): proj2 = self.config['proxoperators'][1](self.config) u_2 = proj2.work(u_1); print(norm(self.config['u_0'][:,:,0])); # estimate the gap in the relevant metric if self.config['Nx'] ==1 or self.config['Ny']==1 : ... ... @@ -170,11 +169,6 @@ class Phase(Problem): tmp_gap = tmp_gap+(norm(u_1[:,:,j]-u_2[:,:,j])/square(self.config['norm_rt_data'])); gap_0=sqrt(tmp_gap); print(gap_0); print(norm(u_1[:,:,0])) print(norm(u_2[:,:,0])) print(proj1) print(proj2) # sets the set fattening to be a percentage of the # initial gap to the unfattened set with ... ... @@ -209,7 +203,9 @@ class Phase(Problem): #print(nonzero(self.u1)) #print(self.u1[self.u1.nonzero()]); print(norm(self.u1)); print(self.u1[64,16]); print(norm(self.u2)); print(self.u1[71,46]); #print(self.gap); #print(self.change); ... ...
 ... ... @@ -260,23 +260,16 @@ class Approx_P_JWST_Poisson(ProxOperator): for j in range(product_space_dimension-1): #print(u[:,:,j].nonzero()); #print(norm(data_sq[:,:,j])) U = fft2( indicator_ampl *exp(1j*illumination_phase [:,:,j]) * u[:,:,j]); U_sq = U * conj(U); tmp = U_sq/data_sq[:,:,j]; #print(tmp); #tmp2= nonzero(data_zeros[:,j]); #tmpI = data_zeros[data_zeros[:,j] != 0, j]; mask = ones(tmp.shape, np.bool); #print(mask.shape); mask[data_zeros[j]] = 0; tmp[mask]=1; U_sq[mask]=0; IU= tmp==0; tmp[IU]=1; tmp=log(tmp); #print(tmp); hU = sum(sum(U_sq *tmp + data_sq[:,:,j] - U_sq)); if hU>=epsilon+TOL2: U0 = magproj(U,data[:,:,j]); #argument order changed compared to matlab implementation!!! ... ... @@ -285,7 +278,6 @@ class Approx_P_JWST_Poisson(ProxOperator): u_new[:,:,j] = u[:,:,j] #else: # no change #print(norm(u[:,:,j])); # now project onto the pupil constraint. # this is a qualitative constraint, so no ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!