Commit 69d9e311 authored by alexander.dornheim's avatar alexander.dornheim
Browse files

Moved definition of use_farfield_fromula and fresnel_nr from JWST_in to phase...

Moved definition of use_farfield_fromula and fresnel_nr from JWST_in to phase since if statements are not possible in dictonary and user only needs to specify distance
parent bd635273
......@@ -50,13 +50,14 @@ new_config = {
'dim' : 4, #size of the product space
#moved to phase since if statements not possible in dictonary
#if 'distance' =='near field':
# 'fresnel_nr' : 1*2*pi*config['Nx'],
# 'use_farfield_formula' : 0,
#else:
'fresnel_nr' : 0, #1*2*pi*prbl.Nx;
'use_farfield_formula' : 1,
# 'fresnel_nr' : 0, #1*2*pi*prbl.Nx;
# 'use_farfield_formula' : 1,
# What are the noise characteristics (Poisson or Gaussian or none)?
......
......@@ -29,6 +29,17 @@ class Phase(Problem):
"""
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*pi*self.config['Nx']
self.config['use_farfield_formula'] = 0
else:
self.config['fresnel_nr'] = 0
self.config['use_farfield_formula'] = 1
#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