What happened?
The black-body source in the METIS WCU is instantiated on a wavelength range that is determined by the filter that is in place when the OpticalTrain is built. In wcu_img_lm that is Lp. After FilterWheel.change_filter(), the source is not recomputed and therefore does not necessarily cover the wavelength range of the new filter. The Lp definition reaches into the M-band which is why most M-band filters receive some flux. The bug was probably missed because of that.
The same problem occurs in wcu_img_n.
The fix should occur in WCUSource.get_wavelength(), where the full LM (or N) wavelength range should be used.
Code to reproduce
cmd = sim.UserCommand(use_instrument="METIS", set_modes=['wcu_img_lm'])
metis = sim.OpticalTrain(cmd)
wcu = metis['wcu_source']
wcu.set_fpmask("pinhole_lm")
metis['filter_wheel'].change_filter("Mp")
metis.observe()
assert metis.image_planes[0].data.max() != metis.image_planes[0].data.min()
# -> AssertionError
Exception traceback
ScopeSim bug_report()
IRDB installation
Cloned and linked IRDB repository
Use case
Other
What happened?
The black-body source in the METIS WCU is instantiated on a wavelength range that is determined by the filter that is in place when the
OpticalTrainis built. Inwcu_img_lmthat isLp. AfterFilterWheel.change_filter(), the source is not recomputed and therefore does not necessarily cover the wavelength range of the new filter. TheLpdefinition reaches into the M-band which is why most M-band filters receive some flux. The bug was probably missed because of that.The same problem occurs in
wcu_img_n.The fix should occur in
WCUSource.get_wavelength(), where the full LM (or N) wavelength range should be used.Code to reproduce
Exception traceback
ScopeSim bug_report()
IRDB installation
Cloned and linked IRDB repository
Use case
Other