@@ -289,7 +289,8 @@ def basic_opt_observed():
289289 src = st .star (flux = 15 )
290290 cmd = sim .UserCommands (use_instrument = "basic_instrument" ,
291291 ignore_effects = SWITCHOFF ,
292- properties = {"!OBS.dit" : 10 , "!OBS.ndit" : 1 })
292+ properties = {"!OBS.dit" : 10 , "!OBS.ndit" : 1 ,
293+ "!DET.gain" : 1. })
293294 opt = sim .OpticalTrain (cmd )
294295 opt .observe (src )
295296 default = int (opt .readout ()[0 ][1 ].data .sum ())
@@ -304,7 +305,8 @@ def basic_opt_with_autoexp_and_digitize_observed():
304305 src = st .star (flux = 15 )
305306 cmd = sim .UserCommands (use_instrument = "basic_instrument" ,
306307 ignore_effects = SWITCHOFF ,
307- properties = {"!OBS.dit" : 10 , "!OBS.ndit" : 1 })
308+ properties = {"!OBS.dit" : 10 , "!OBS.ndit" : 1 ,
309+ "!DET.gain" : 1. })
308310 opt = sim .OpticalTrain (cmd )
309311 opt .observe (src )
310312 default = int (opt .readout ()[0 ][1 ].data .sum ())
@@ -358,7 +360,7 @@ def test_kwargs_override_obs_dict(self, obs, dit, ndit, factor, adconvert):
358360 pytest .param (10 , 3 , 3 , False ,
359361 marks = pytest .mark .xfail (reason = "S.E. doesn't get kwargs without A.E.." )),
360362 pytest .param (None , None , 1 , True ,
361- marks = pytest .mark .xfail (reason = "A.E. dosen 't use dit, ndit from !OBS if those are None in kwargs." ))])
363+ marks = pytest .mark .xfail (reason = "A.E. doesn 't use dit, ndit from !OBS if those are None in kwargs." ))])
362364 def test_kwargs_override_obs_dict_also_with_autoexp (
363365 self , obs_aeq , dit , ndit , factor , adconvert ):
364366 """This should prioritize dit, ndit from kwargs.
@@ -379,7 +381,9 @@ def test_autoexp(self, obs_aeq, exptime, factor):
379381 o_dit , o_ndit = opt .cmds ["!OBS.dit" ], opt .cmds ["!OBS.ndit" ]
380382 opt .cmds ["!OBS.dit" ] = None
381383 opt .cmds ["!OBS.ndit" ] = None
384+ print ("NDIT before:" , opt .cmds ["!OBS.ndit" ])
382385 kwarged = int (opt .readout (exptime = exptime )[0 ][1 ].data .sum ())
386+ print ("NDIT after:" , opt .cmds ["!OBS.ndit" ])
383387 assert not adconverter ._should_apply ()
384388 opt .cmds ["!OBS.dit" ] = o_dit
385389 opt .cmds ["!OBS.ndit" ] = o_ndit
0 commit comments