From ea23a5f2e02429bc6e3173b4c741489b13f3e159 Mon Sep 17 00:00:00 2001 From: Yilun Guan Date: Wed, 25 Oct 2023 10:54:27 -0400 Subject: [PATCH] update config to match latest scheduler --- src/scheduler_server/configs/flex.py | 104 +++++++++++++++++---------- tests/test_handler.py | 5 +- 2 files changed, 66 insertions(+), 43 deletions(-) diff --git a/src/scheduler_server/configs/flex.py b/src/scheduler_server/configs/flex.py index adc8525..b71a09f 100644 --- a/src/scheduler_server/configs/flex.py +++ b/src/scheduler_server/configs/flex.py @@ -1,41 +1,67 @@ config = """ -blocks: - moon: !source moon - -rules: - - !rule - name: sun-avoidance - min_angle_az: 6 - min_angle_alt: 6 - time_step: 10 - n_buffer: 3 - - !rule - name: min-duration - min_duration: 300 - - !rule - name: make-source-plan - specs: - - bounds_x: - - -0.5 - - 0.5 - bounds_y: - - -0.5 - - 0.5 - spec_shape: ellipse - max_obs_length: 6000 - - !rule - name: make-source-scan - preferred_length: 1800 - - !rule - name: alt-range - alt_range: - - 20 - - 90 - -merge_order: - - moon -post_rules: - - !rule - name: min-duration - min_duration: 600 + blocks: + calibration: + saturn: + type: source + name: saturn + moon: + type: source + name: moon + rules: + - name: sun-avoidance + min_angle_az: 45 + min_angle_alt: 45 + time_step: 30 + n_buffer: 10 + - name: make-drift-scan + block_query: calibration + array_query: full + el_bore: 50 + drift: true + post_rules: + - name: min-duration + min_duration: 600 + merge_order: + - moon + - saturn + geometries: + full: + left: + ws6: + center: + - -10.9624 + - 6.46363 + radius: 6 + ws5: + center: + - -10.9624 + - -6.46363 + radius: 6 + middle: + ws1: + center: + - 0 + - 12.634 + radius: 6 + ws0: + center: + - 0 + - 0 + radius: 6 + ws4: + center: + - 0 + - -12.634 + radius: 6 + right: + ws2: + center: + - 10.9624 + - 6.46363 + radius: 6 + ws3: + center: + - 10.9624 + - -6.46363 + radius: 6 """ \ No newline at end of file diff --git a/tests/test_handler.py b/tests/test_handler.py index cb8d393..0ddc986 100644 --- a/tests/test_handler.py +++ b/tests/test_handler.py @@ -14,7 +14,4 @@ def test_basic(): def test_flex(): t0 = datetime(2023, 1, 1, 0, 0, 0, tzinfo=timezone.utc) t1 = datetime(2023, 1, 10, 0, 0, 10, tzinfo=timezone.utc) - cmds = handler.flex_policy(t0, t1, configs.get_default_config('flex')) - print(cmds) - raise - \ No newline at end of file + cmds = handler.flex_policy(t0, t1, configs.get_default_config('flex')) \ No newline at end of file