Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ python-dotenv
requests
socs
sorunlib
git+https://github.com/simonsobs/scheduler.git@d10137a5326cc48822212ae118fdb75bcf9d34ef
git+https://github.com/simonsobs/scheduler.git@b603ec94acaa9893fdab7319ddec87e4b5552f51
5 changes: 4 additions & 1 deletion src/scheduler_server/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def rest_handler(t0, t1, policy_config={}):
config = {"schedule": config}

# add cal targets from linked table
cal_keys = ['boresight', 'elevation', 'focus', 'allow_partial', 'az_speed', 'az_accel', 'order']
cal_keys = ['boresight', 'elevation', 'focus', 'allow_partial', 'drift',
'az_branch', 'az_speed', 'az_accel', 'source_direction', 'order']
# don't overwrite any cal targets passed in the config
if 'cal_targets' not in config:
config['cal_targets'] = []
Expand All @@ -99,6 +100,8 @@ def rest_handler(t0, t1, policy_config={}):
cal_targets.append(cal_target)
# sort based on order
cal_targets_sorted = sorted(cal_targets, key=lambda x: x["order"])
# remove order
cal_targets_sorted = [{k: v for k, v in item.items() if k != "order"} for item in cal_targets_sorted]
# add into config
config['cal_targets'] = config['cal_targets'] + cal_targets_sorted
logger.info(f"Best plan cal targets: {config['cal_targets']}")
Expand Down