Skip to content

acamd: do not acquire on a frame exposed before the acquisition started - #495

Open
cfremling wants to merge 1 commit into
mainfrom
fix/acam-acquire-frame-after-start
Open

cfremling wants to merge 1 commit into
mainfrom
fix/acam-acquire-frame-after-start

Conversation

@cfremling

@cfremling cfremling commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

The ACAM framegrab runs through the slew, and do_acquire() is called with the first frame to finish after the acquire command. That frame can have been exposed entirely while the telescope was still settling: with a 2 s exposure and ~3.1 s cycle, a frame finishing 1–3 s after the command began 1.5–3 s before it.

Measured on 2026-10-29 (18 acquisitions, auto-ontarget, acquisition starting at ontarget): 4 acquisitions used such a frame (first solve 1.2–2.6 s after ontarget) and overshot the first correction by 46–107% (18.5" → 19.7" in the opposite direction on one target), costing 1–3 extra frames each; every acquisition whose first frame began at or after ontarget corrected to within 35% (median 5%) in one move. Frames exposed during the slew that fail to solve already cost one frame harmlessly.

Target::acquire() stamps the start of an acquisition; do_acquire() does not use a frame whose readout time (camera_info.mjd0) is less than one frame cycle (kintime) after it. Costs one frame cycle only when the in-flight frame straddles the command, instead of a fixed delay on every target.

Not yet tested on sky.

Applies to main on its own, and merges cleanly before or after #503.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T13:31:32.685733Z d119269 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cfremling

cfremling commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator Author

Not yet tested on sky (the dome had closed). The 18 acquisitions of that night are the measurement this PR is based on.

@cfremling
cfremling force-pushed the fix/acam-acquire-frame-after-start branch from d119269 to d6e30b0 Compare October 29, 2026 14:10
@cfremling
cfremling changed the base branch from main to feat/fineacquire-wait-for-move October 29, 2026 14:10
The framegrab runs through the slew and do_acquire() is called with the
first frame to finish after the acquire command, which can have been
exposed entirely while the telescope was still settling. On 2026-10-29,
4 of 18 acquisitions used such a frame (its solve landed 1.2-2.6 s after
ontarget: a 2 s exposure started 1.5-3 s before it) and overshot the
first correction by 46-107%, costing 1-3 extra frames each; every
acquisition whose first frame began at or after ontarget corrected to
within 35% (median 5%) in one move.

Target::acquire() stamps the start; do_acquire() skips a frame whose
readout time (mjd0) is less than one frame cycle after it. Costs one
frame cycle only when the in-flight frame straddles the command.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants