Skip to content

METIS WCU blackbody source has too restricted wavelength range #871

@oczoske

Description

@oczoske

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()

scopesim: 0.11.2a2

IRDB installation

Cloned and linked IRDB repository

Use case

Other

Metadata

Metadata

Assignees

Labels

METIS AITIssues relating to METIS AIT simulations

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions