Skip to content

Commit

Permalink
Use new min_duration arg on seq.scan() from [1]
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJKoopman authored and kmharrington committed Oct 26, 2024
1 parent 7bcb266 commit fb650d2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/schedlib/policies/sat.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,13 @@ def cmb_scan(state, block):
commands = []

commands.extend([
f"scan_stop = {repr(block.t1)}",
f"if datetime.datetime.now(tz=UTC) < scan_stop - datetime.timedelta(minutes=10):",
" run.seq.scan(",
f" description='{block.name}',",
f" stop_time='{block.t1.isoformat()}',",
f" width={round(block.throw,3)}, az_drift=0,",
f" subtype='cmb', tag='{block.tag}',",
" )",
"run.seq.scan(",
f" description='{block.name}',",
f" stop_time='{block.t1.isoformat()}',",
f" width={round(block.throw,3)}, az_drift=0,",
f" subtype='cmb', tag='{block.tag}',",
f" min_duration=600,",
")",
])
return state, (block.t1 - state.curr_time).total_seconds(), commands

Expand Down

0 comments on commit fb650d2

Please sign in to comment.