Fix camera simulator to respect exposure time#1389
Closed
Conversation
Member
|
@copilot i don't see any changes. |
Co-authored-by: wtgee <70736+wtgee@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
[WIP] Fix camera simulator to respect exposure time
Fix camera simulator to respect exposure time
Feb 14, 2026
Member
|
This was not done correctly. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1389 +/- ##
===========================================
- Coverage 64.83% 64.82% -0.02%
===========================================
Files 104 104
Lines 9444 9438 -6
Branches 831 832 +1
===========================================
- Hits 6123 6118 -5
+ Misses 3178 3175 -3
- Partials 143 145 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Fixes a bug in the DSLR camera simulator where the exposure time trimming logic was not being properly applied to the actual exposure timer.
Problem
The DSLR camera simulator's
take_observationmethod was intended to limit exposures > 1 second to 1 second for test performance. However, the implementation had a bug:kwargs["exptime"] = 1to trim the exposure time in metadata_start_exposureuseskwargs.get("simulator_exptime", seconds)to determine the actual timer durationsimulator_exptimewasn't being set, the timer used the original (untrimmed)secondsvalueThis caused long exposures in tests to actually wait for the full duration instead of being trimmed to 1 second.
Solution
Added
kwargs["simulator_exptime"] = 1when trimming the exposure time, ensuring that_start_exposureuses the trimmed 1-second value for both the metadata and the actual exposure timer.Changes Made
src/panoptes/pocs/camera/simulator/dslr.pysimulator_exptimeparameter when trimming exposure times > 1 secondTesting
The fix is minimal and surgical, affecting only the exposure time trimming logic without touching any unrelated code.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.