time_limit = 180 # Max Number of iterations before next projection is collected. max_iter = 125 #SNR SNR = 100 noise = True save = False # Save final reconstruction. show_live_plot = 1 # Show intermediate results. ########################################## #Read Image. (file_name, original_volume) = load_data(vol_size, file_name) file_name = 'au_sto' (Nslice, Nray, _) = original_volume.shape # Generate Tilt Angles. tiltAngles = np.load('Tilt_Series/' + file_name + '_tiltAngles.npy') Nproj = tiltAngles.shape[0] # Initialize C++ Object.. tomo_obj = ctvlib.ctvlib(Nslice, Nray, Nproj) # Generate measurement matrix A = parallelRay(Nray, tiltAngles) tomo_obj.load_A(A) A = None tomo_obj.rowInnerProduct()
time_limit = 180 # Max Number of iterations before next projection is collected. max_iter = 125 #SNR SNR = 100 noise = True save = False # Save final reconstruction. show_live_plot = 0 # Show intermediate results. ########################################## # #Read Image. (file_name, tiltSeries) = load_data(vol_size, file_name) (Nslice, Nray, Nproj) = tiltSeries.shape b = np.zeros([Nslice, Nray * Nproj]) # Initialize C++ Object.. tomo_obj = ctvlib.ctvlib(Nslice, Nray, Nproj) for s in range(Nslice): b[s, :] = tiltSeries[s, :, :].transpose().ravel() tomo_obj.setTiltSeries(b) tiltSeries = None # Generate Tilt Angles. tiltAngles = np.load('Tilt_Series/' + file_name + '_tiltAngles.npy') # Generate measurement matrix