simonsobs / scheduler

Scheduler for SO
0 stars 1 forks source link

difference of det_setup between satp1 and satp3 #63

Closed ykyohei closed 6 months ago

ykyohei commented 6 months ago

det_setup command is different between satp1 and satp3. How should we implement this difference? https://github.com/simonsobs/scheduler/blob/67a556a0e94393106448f1d7d2282b0e87d2f130/src/schedlib/policies/sat.py#L308-L319

satp3

commands = [
            "",
            "################### Detector Setup######################",
            "run.smurf.take_bgmap(concurrent=True)",
            "run.smurf.iv_curve(concurrent=True)",
            "for smurf in pysmurfs:",
            "    smurf.bias_dets.start(rfrac=0.5, kwargs=dict(bias_groups=[0,1,2,3,4,5,6,7,8,9,10,11]))",
            "time.sleep(300)",
            "run.smurf.bias_step(concurrent=True)",
            "#################### Detector Setup Over ####################",
            "",
        ]
guanyilun commented 6 months ago

you can make a copy of this operation: https://github.com/simonsobs/scheduler/blob/67a556a0e94393106448f1d7d2282b0e87d2f130/src/schedlib/policies/sat.py#L293 and then change the registered name, like satp3.det_setup, and then change the configuration file to use this operation instead of the sat generic one: e.g. https://github.com/simonsobs/scheduler/blob/67a556a0e94393106448f1d7d2282b0e87d2f130/src/schedlib/policies/satp3.py#L173