simonsobs / scheduler

Scheduler for SO
0 stars 1 forks source link

Optimize detector setup times and locations #135

Open mmccrackan opened 11 hours ago

mmccrackan commented 11 hours ago

For some CMB observations, particularly the short 10 to 15-minute special ones, the detector setup may occur before and overlap with most of the observation duration, causing it to be only a few minutes long or skipped entirely. The detector setup step should likely be optimized to avoid this and improve observing efficiency.

kmharrington commented 9 hours ago

As we look to work on this we'll also want to loop in this error: https://github.com/simonsobs/scheduler/issues/113

I'm seeing this regularly when running satp1 schedules right now and I think it is related to trying to get through all the different setup steps "in time" for the beginning of these scans. It definitely really happens with the HWP starts from the off position. Ex:

platform: satp1

# yaml loads iso format automatically into datetimes
t0: 2024-12-01T17:00:00+00:00
t1: 2024-12-02T17:00:00+00:00
t0_state_file: None

elevation: 60
boresight: 0
az_speed: 0.5
az_accel: 0.25

# optional, only needed if running non-defaults
hwp_dir: False # True: forwards, False: backwards
run_relock: False # Relock detectors at the beginning of the schedule
home_at_end: True # Home: spin down HWP and go to (180,60)
bias_step_cadence: 900

leads to

run.wait_until('2024-12-01T17:00:00.010000+00:00', tolerance=3600)
run.acu.set_scan_params(0.5, 0.25)
run.wait_until('2024-12-01T17:00:00.030000+00:00')
run.acu.move_to(az=180.0, el=48.0)
run.wait_until('2024-12-01T17:01:59.030000+00:00')
run.acu.move_to(az=180.0, el=48.0)
run.wait_until('2024-12-01T17:04:01+00:00')
run.acu.move_to(az=49.1, el=48.0)
run.acu.move_to(az=49.1, el=60.0) <---- not sun safe until closer to 17:25
run.wait_until('2024-12-01T17:04:00+00:00')
run.acu.move_to(az=49.1, el=60.0)
run.acu.set_boresight(0)

Poking around with the sun avoidance at this time and the rules for getting detector setups. It might never be possible get more of this scan than it already does. But looking at all the parts of optimizing when and how detector setup is run is still a good idea.