'poisson_multiplier': 2e6, 'free_prop_method': 'TF', 'kwargs': {'probe_mag_sigma': 100, 'probe_phase_sigma': 100, 'probe_phase_max': 0.5}, } params = params_2d_cell # n_ls = ['nonoise', 'n1e9', 'n1e8', 'n1e7', 'n1e6', 'n1e5', 'n1e4'] n_ls = ['nonoise'] # n_ls = ['n4e8', 'n4e7', 'n4e6', 'n4e5', 'n4e4', 'n1.75e8', 'n1.75e7', 'n1.75e6'] # n_ls = [x + '_ref' for x in n_ls] for n_ph in n_ls: if 'nonoise' in n_ph: params['fname'] = 'data_cell_phase.h5' params['poisson_multiplier'] = 2e6 else: params['fname'] = 'data_cell_phase_{}.h5'.format(n_ph) if '_ref' in n_ph: n_ph_1 = float(n_ph[1:n_ph.find('_ref')]) else: n_ph_1 = float(n_ph[1:]) params['poisson_multiplier'] = n_ph_1 / 5e4 params['output_folder'] = os.path.join(params['cost_function'], n_ph) reconstruct_fullfield(**params)
reconstruct_fullfield(fname=params['fname'], theta_st=0, theta_end=params['theta_end'], n_epochs=params['n_epochs'], n_epochs_mask_release=params['n_epochs_mask_release'], shrink_cycle=params['shrink_cycle'], crit_conv_rate=0.03, max_nepochs=200, alpha_d=params['alpha_d'], alpha_b=params['alpha_b'], gamma=params['gamma'], free_prop_cm=params['free_prop_cm'], learning_rate=params['learning_rate'], output_folder=params['output_folder'], minibatch_size=params['batch_size'], theta_downsample=params['theta_downsample'], save_intermediate=params['save_intermediate'], full_intermediate=params['full_intermediate'], energy_ev=params['energy_ev'], psize_cm=params['psize_cm'], cpu_only=params['cpu_only'], save_path=params['save_folder'], phantom_path=params['phantom_path'], multiscale_level=params['multiscale_level'], n_epoch_final_pass=params['n_epoch_final_pass'], initial_guess=params['initial_guess'], n_batch_per_update=params['n_batch_per_update'], dynamic_rate=True, probe_type=params['probe_type'], probe_initial=None, probe_learning_rate=1e-3, pupil_function=None, forward_algorithm=params['forward_algorithm'], random_theta=False, **params['kwargs'])