diff --git a/requirements.txt b/requirements.txt index 1361757..01c1cd3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/src/scheduler_server/handler.py b/src/scheduler_server/handler.py index 260cadf..3ddd398 100644 --- a/src/scheduler_server/handler.py +++ b/src/scheduler_server/handler.py @@ -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'] = [] @@ -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']}")