Commit 6b791bae authored by alexander.dornheim's avatar alexander.dornheim
Browse files

Moved fresnel_number for JWST calculation from phase to JWST_data_processor....

Moved fresnel_number for JWST calculation from phase to JWST_data_processor. In matlab version this is in the config file.
parent 3ce6d057
......@@ -29,6 +29,15 @@ import proxtoolbox.Utilities as Utilities
def JWST_data_processor(config):
#moved here from JWST_in since if statements not possible in dictonary
if 'distance' in self.config:
if self.config['distance'] =='near field':
self.config['fresnel_nr'] = 1*2*np.pi*self.config['Nx']
self.config['use_farfield_formula'] = 0
else:
self.config['fresnel_nr'] = 0
self.config['use_farfield_formula'] = 1
data_ball = config['data_ball'];
......
......@@ -27,19 +27,7 @@ class Phase(Problem):
----------
new_config : dict, optional - Parameters to initialize the problem. If unspecified, the default config is used.
"""
self.config.update(new_config)
#moved here from JWST_in since if statements not possible in dictonary
if 'distance' in self.config:
if self.config['distance'] =='near field':
self.config['fresnel_nr'] = 1*2*np.pi*self.config['Nx']
self.config['use_farfield_formula'] = 0
else:
self.config['fresnel_nr'] = 0
self.config['use_farfield_formula'] = 1
self.config.update(new_config)
#call data processor, read data
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment