Repository navigation
Conversation
…slicecam image The L and R slicecam images sit at different sky levels, so ds9 needs a different scale and stretch for each to show background detail. write_image() now subtracts each camera's sky level from the copy it writes to the file, so both display at the same level with one scale, and records the value as BGSUB (raw = data + BGSUB). The camera buffer that fine acquisition and auto-exposure read is not changed. Frames kept with saveframes are copies of the file. No geometry is used, because the lit area moves with slit width, slit offset and binning (DATASEC does not follow it). Lit pixels are those above halfway between the 5th and 90th percentiles of the image, and the sky level is their 3-sigma clipped median (sigma from the MAD). On 13 archived frames (binning 1 and 4, slit 0.36-1.5", offset +-3", 0.1-6 s; night, twilight and day) it is within 0.55 sigma of the histogram mode of the lit sky in both cameras, and an injected saturated star moves it by less than 1 sigma until the star covers ~10% of the frame. It needs the lit area to cover more than 10% of the frame (17-49% in those frames). 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 was referenced Nov 5, 2026
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.
The L and R slicecam images sit at different sky levels, so ds9 needs a different scale and stretch for each to show background detail.
Slicecam::FITS_file::write_image()now subtracts each camera's sky level from the copy it writes to the file and records it asBGSUB(raw = data + BGSUB). The camera buffer that fine acquisition and auto-exposure read is not changed; frames kept withsaveframesare copies of the file.The sky level uses no geometry, because the lit area moves with slit width, slit offset and binning (DATASEC does not follow it): lit pixels are those above halfway between the 5th and 90th percentiles of the image, and the level is their 3-sigma clipped median (sigma from the MAD). On 13 archived frames (binning 1 and 4, slit 0.36-1.5", offset ±3", 0.1-6 s; night, twilight and day) it is within 0.55 sigma of the histogram mode of the lit sky in both cameras, and an injected saturated star moves it by less than 1 sigma until the star covers ~10% of the frame.
Rebuild, restart slicecamd. Tested on sky using branch cf/summit-20261030 on 2026-11-03.
Jira: PAL-134.
🤖 Generated with Claude Code