Skip to content

Commit

Permalink
Add test for new wcu mode
Browse files Browse the repository at this point in the history
  • Loading branch information
teutoburg committed Apr 5, 2024
1 parent 17915ac commit 6da365a
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion METIS/tests/test_metis.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from matplotlib.colors import LogNorm

import scopesim
from scopesim.source.source_templates import star_field
from scopesim.source.source_templates import star_field, empty_sky
#import scopesim_templates as sim_tp

PLOTS = False
Expand Down Expand Up @@ -280,3 +280,21 @@ def test_something_comes_out_img_n(self):
plt.show()

assert mx > med + 3 * std

def test_wcu_modes_disables_upstream(self):
cmd = scopesim.UserCommands(
use_instrument="METIS",
set_modes=["wcu", "img_n"])
opt = scopesim.OpticalTrain(cmd)
opt.observe(empty_sky())
h_wcu = opt.readout()

cmd = scopesim.UserCommands(
use_instrument="METIS",
set_modes=["light", "img_n"])
opt = scopesim.OpticalTrain(cmd)
opt.observe(empty_sky())
h_obs = opt.readout()

# WCU must be less because atmo emission is not present
assert h_obs[0][1].data.mean() > h_wcu[0][1].data.mean()

0 comments on commit 6da365a

Please sign in to comment.