from setup_spectro_only import *
import cbpassist as ca
import time

#- JNeveu: first run of spectrograph calibration
outdir = '../data/cbp/spectro_calibration/2021-01-26_run1/'

#- JNeveu: second run two days later
outdir = '../data/cbp/spectro_calibration/2021-01-28_run2/'

#- JNeveu: first run of spectrograph calibration after unpluging and repluging the fiber to the calibration lamp
outdir = '../data/cbp/spectro_calibration/2021-01-28_run3/'

#- 


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

n_repeats = 100
e = 0.03


for n in range(n_repeats):
    print(f'Exposing spectrograph for time {e}s')
    d['spectro.exptime'] = e
    sched.shoot(d, outdir)
