Repository navigation
sequencerd, camerad: slew to the next target during the readout; stop and abort an NEXP>1 series - #508
Open
cfremling wants to merge 3 commits into
Open
sequencerd, camerad: slew to the next target during the readout; stop and abort an NEXP>1 series#508cfremling wants to merge 3 commits into
cfremling wants to merge 3 commits into
Conversation
flexure_set ran in parallel with the slew, so flexured computed the compensation from telescope telemetry read mid-slew, for the previous pointing, and it was never refreshed during an NEXP>1 series or before a REPEAT. For a target the telescope slews to, the compensator is now set after acquisition and the target offset, in parallel with the slit move, and joined before the exposure. When the telescope stays where it is (a calibration, or a repeat of the same pointing) it is set with the other workers, as before. During an NEXP>1 series it is re-applied in the readout between sub-exposures, only while that readout is running and the next shutter has not opened, with fresh, finite TCS telemetry and no thread error; a failure is reported and otherwise ignored. A REPEAT sets it once camera_set has seen camerad ready. Readouts are counted from camerad's shutter reports and PIXELCOUNT messages, so the count cannot run ahead of the shutter. abort waits up to 20 s (was 5 s) for the sequence to exit, since the readout wait may be inside a flexured call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the last sub-exposure of a science target starts reading out, the target is completed and the next one is picked through the normal path (get_next, activate, publish, slew, acquire) while camerad reads out. A readout gate holds every camerad command for the new target (camera settings, expose) until camerad reports READY. There is no early pick in single-step or single-target mode, after a cancel, with a thread error set, or when the current row is a calibration. Readouts are counted from camerad's PIXELCOUNT messages, so the count cannot run ahead of the shutter; a PIXELCOUNT from the tail of the previous readout cannot end the next target's EXPOSE wait. camera_set runs in parallel with the slew and acquisition behind the readout gate and is joined just before the exposure; a target is never exposed unless its own camera settings were applied. camerad: READY is published when the last frame has arrived, a few ms before its FITS write ends, so a camera setting sent right after READY was refused (write in progress). A binning change or DMA remap now waits up to 2 s for a finishing write before refusing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stop: the sequencer accepts it for the whole series of the current target (the EXPOSE wait covers only the first sub-exposure; camerad not READY covers the rest, except the previous target's last readout after a pick) and no longer clears a cancel. camerad ends the series after the frame in progress, cut short if it is integrating with 5 s or more left, instead of starting the next sub-exposure. abort no longer starts the next sub-exposure either. A cancelled exposure's remaining PIXELCOUNT messages cannot set the READOUT wait later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge after #507. This PR includes #507's commit underneath, because both change the same readout code. When #507 has been merged with "Create a merge commit", this PR shows only its own two commits and merges normally. If #507 was squash-merged instead, this PR shows a conflict; ask Christoffer to update it.
camera_setruns in parallel with the slew and acquisition behind the gate and is joined just before the exposure; a target is never exposed unless its own camera settings were applied. camerad: READY comes a few ms before the last frame's FITS write ends, so a binning change or DMA remap now waits up to 2 s for a finishing write before refusing.stopis accepted for the whole series of the current target (not for the previous target's last readout after a pick) and no longer clears a cancel; camerad ends the series after the frame in progress, cut short if it is integrating with 5 s or more left.abortno longer starts the next sub-exposure.Both change the readout wait and
stop_exposure, which #507 also changes; that is why this PR is built on it.Rebuild, restart sequencerd and camerad. Check: "last readout of under way: completing it and picking the next target" at each target change;
seq stopduring an NEXP>1 series ends it after the current frame.Tested on sky using branch cf/summit-20261030 on 2026-11-03: 22 target changes were picked at the start of the previous target's last readout, the slew overlapping the ~21 s readout. The NEXP>1 stop/abort path was not needed that night.
Jira: PAL-181, PAL-142.
🤖 Generated with Claude Code