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 committed Oct 17, 2024
1 parent 9c933f9 commit 1785d56
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 @@ -257,14 +257,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 1785d56

Please sign in to comment.