@@ -54,26 +54,23 @@ def setup(self, config, base, image_num, obj_num, ignore, logger):
5454 ]
5555 req = {"SCA" : int , "filter" : str , "mjd" : float , "exptime" : float }
5656 opt = {
57- 'draw_method' : str ,
58- 'stray_light' : bool ,
59- 'thermal_background' : bool ,
60- 'reciprocity_failure' : bool ,
61- 'dark_current' : bool ,
62- 'ipc' : bool ,
63- 'read_noise' : bool ,
64- 'sky_subtract' : bool ,
65- 'ignore_noise' : bool ,
66- 'sca_filepath' : str ,
67- 'dither_from_file' : str ,
68- 'save_diff' : bool ,
69-
70- 'quantum_efficiency' : str ,
71- # 'brighter_fatter': str,
72- # 'nonlinearity' : str,
73- 'brighter_fatter' : bool ,
74- 'nonlinearity' : bool ,
75- 'add_effects' : dict ,
57+ "draw_method" : str ,
58+ # "stray_light": bool,
59+ # "thermal_background": bool,
60+ # "reciprocity_failure": bool,
61+ # "dark_current": bool,
62+ # "nonlinearity": bool,
63+ # "ipc": bool,
64+ # "read_noise": bool,
65+ "add_effects" : dict ,
66+ "sca_filepath" : str ,
67+ "sky_subtract" : bool ,
68+ "ignore_noise" : bool ,
69+ "save_diff" : bool ,
7670 }
71+
72+ logger .warning ("opt dict = %s" % (str (opt )))
73+
7774 params = galsim .config .GetAllParams (config , base , req = req , opt = opt , ignore = ignore + extra_ignore )[0 ]
7875
7976 self .sca = params ["SCA" ]
@@ -113,9 +110,9 @@ def setup(self, config, base, image_num, obj_num, ignore, logger):
113110 # config['wcs'] = wcs
114111
115112 self .rng = galsim .config .GetRNG (config , base )
116- self .visit = int (base [' input' ][ ' obseq_data' ][ ' visit' ])
113+ self .visit = int (base [" input" ][ " obseq_data" ][ " visit" ])
117114
118- self .sca_filepath = params .get (' sca_filepath' , None )
115+ self .sca_filepath = params .get (" sca_filepath" , None )
119116
120117 # If user hasn't overridden the bandpass to use, get the standard one.
121118 if "bandpass" not in config :
@@ -245,19 +242,18 @@ def addNoise(self, image, config, base, image_num, obj_num, current_var, logger)
245242 if self .ignore_noise :
246243 return
247244
248- base [' current_noise_image' ] = base [' current_image' ]
245+ base [" current_noise_image" ] = base [" current_image" ]
249246 # rng = galsim.config.GetRNG(config, base)
250- logger .info (' image %d: Start RomanSCA detector effects' , base .get (' image_num' , 0 ))
247+ logger .info (" image %d: Start RomanSCA detector effects" , base .get (" image_num" , 0 ))
251248
252249 # create padded image
253- bound_pad = galsim .BoundsI (xmin = 1 , ymin = 1 ,
254- xmax = 4096 , ymax = 4096 )
250+ bound_pad = galsim .BoundsI (xmin = 1 , ymin = 1 , xmax = 4096 , ymax = 4096 )
255251 im_pad = galsim .Image (bound_pad )
256252 im_pad .array [4 :- 4 , 4 :- 4 ] = image .array [:, :]
257253
258- effects_list = self .base [' image' ][ ' add_effects' ].keys ()
254+ effects_list = self .base [" image" ][ " add_effects" ].keys ()
259255 for effect_name in effects_list :
260- args = (self .base [' image' ][ ' add_effects' ][effect_name ], self .base , self .logger , self .rng )
256+ args = (self .base [" image" ][ " add_effects" ][effect_name ], self .base , self .logger , self .rng )
261257 effect = getattr (roman_effects , effect_name )(* args )
262258 im_pad = effect .apply (image = im_pad )
263259
@@ -270,7 +266,7 @@ def addNoise(self, image, config, base, image_num, obj_num, current_var, logger)
270266 sky = roman_effects .setup_sky (self .base , self .logger , self .rng )
271267 sky_image = sky .get_sky_image ()
272268 image -= sky_image
273- sky .save_sky_img (outdir = self .base [' output' ][ ' dir' ])
269+ sky .save_sky_img (outdir = self .base [" output" ][ " dir" ])
274270
275271
276272# Register this as a valid type
0 commit comments