from setup_cbp import *
import cbpassist as ca
import time


outdir = 'mondrik_temp_test/contamination_test_burst'

if not os.path.exists(outdir):
    os.mkdir(outdir)

wavelengths = np.arange(360, 1120, 20)
etime = 100.
spec_exp_time = 0.5

for w in wavelengths:
    e, fp = ca.calc_exp_time(w)
    print('Exposing spectrograph for time {}s, total camera time {}s'.format(spec_exp_time, etime))
    d['keithley.exptime'] = etime
    d['spectro.exptime'] = spec_exp_time
    d['laser.wavelength'] = str(w)
    sched.shoot(d, outdir)
