simonsobs / scheduler

Scheduler for SO
0 stars 1 forks source link

Calibration Target Cutting too many options #87

Open kmharrington opened 1 month ago

kmharrington commented 1 month ago

I'm running into an issue where we should be able to scan both Saturn and Jupiter but the code isn't finding times where that's allowed

Running with this config on the simple sun branch

# yaml loads iso format automatically into datetimes
t0: 2024-08-21T20:00:00+00:00
t1: 2024-08-22T20:00:00+00:00
t0_state_file: 'state_files/state_2024-08-21T20:00:00+00:00.npy'

elevation: 60
boresight: 45
az_speed: 0.5
az_accel: 1.0

hwp_dir: True
stow_at_end: False
run_relock: True

cal_targets:
  - source: jupiter
    # boresight: # if not specified, use scan boresight
    elevation: 48
    focus: 'ws2,ws0'
    allow_partial: True
    az_branch: 270 ## maybe need to scan one side of jupiter
  - source: saturn
    # boresight: # if not specified, use scan boresight
    elevation: 50
    focus: 'ws0,ws5'
    allow_partial: True
    az_branch: 270

I see these scan options

2024-08-16 20:45:27,745 [INFO] -> found 2 scan options for jupiter (ws2,ws0): [
  ScanBlock(jupiter, 24-08-22 08:41:51 -> 24-08-22 11:33:14, az=406.38, el=48.00, throw=16.41, drift=-0.00511)),
  ScanBlock(jupiter, 24-08-22 11:33:23 -> 24-08-22 14:24:54, az=351.05, el=48.00, throw=16.29, drift=-0.00418))
] 
2024-08-16 20:45:27,745 [INFO] -> planning calibration scans for CalTarget(source='saturn', array_query='ws0,ws5', el_bore=50.0, tag='ws0,ws5', boresight_rot=45.0, allow_partial=True, drift=True, az_branch=270)... 
2024-08-16 20:45:28,088 [INFO] -> allow_partial = True: trimming scan options by sun rule 
2024-08-16 20:45:28,221 [INFO] -> found 2 scan options for saturn (ws0,ws5): [
  ScanBlock(saturn, 24-08-22 02:41:19 -> 24-08-22 04:41:53, az=431.60, el=50.00, throw=26.14, drift=-0.00584)),
  ScanBlock(saturn, 24-08-22 06:45:29 -> 24-08-22 08:46:03, az=290.33, el=50.00, throw=27.26, drift=-0.00363))
] 

The first Saturn has no overlap with Jupiter and yet it looks like the schedule is cutting them both. (Hard to tell exactly because these exact parameters are also hitting a parking spot error.

kmharrington commented 1 month ago

The parking stop error on this one seems to be related to wanting to try and get ws0 with Jupiter. I'm guessing this is the plan scanning letting the scan go on for a little too long