Repository navigation
Conversation
Since 2.6.3 the solver's FOV gate comes from the device's sensor and lens (ADR 0027/0029). Test Mode feeds the solver the bundled test image, which is 10.2 deg wide. On an imx296 no lens gives a gate that includes 10.2 deg (no lens [11.65, 18.84], 12mm [13.92, 18.84], 16mm [11.65, 15.77], 25mm [7.02, 9.50]), so on most v3 units Test Mode never solves. #632 added optical_train_known for frames that did not come through the device's optics, but the camera published it once at startup and Test Mode did not change it. Move the Test Mode toggle into _set_test_mode, which republishes the flag: unknown while Test Mode is on, the camera's own answer when it is off. An unknown train also keeps lens self-heal from reading the test image's FOV as a measurement of the fitted lens. Checked with tetra3 on test_images/pifinder_debug_02.png: it solves at 10.20 deg with no gate and with 2.6.1's fixed 12 +- 4 gate, and does not solve under any imx296 gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Since 2.6.3, Test Mode does not solve on most v3 PiFinders. This PR makes Test Mode solve again. Fixes #712.
Cause
Test Mode (Tools > Test Mode) gives the solver a stored star image instead of camera frames. That image shows 10.2 degrees of sky.
In 2.6.3, the solver started to accept only solves whose field of view agrees with the sensor and lens of the PiFinder (the FOV gate, ADR 0027 and ADR 0029). Most v3 units have the imx296 sensor. With the imx296, no lens setting gives a gate that includes 10.2 degrees:
So the solver rejects every Test Mode frame. In 2.6.1 the gate was always 12 ± 4 degrees, and the test image solved.
#632 added the
optical_train_knownflag for this problem: frames that did not come through the PiFinder's own lens get no FOV gate. But the camera set this flag only once, at startup, from the camera type. Test Mode did not change it.Changes
camera_interface.py: the new method_set_test_modeturns Test Mode on or off and publishesoptical_train_knownagain. When Test Mode is on, the flag is false. When Test Mode is off, the flag goes back to the camera's own value (true for real cameras, false for the debug camera). The Test Mode state moves from a local variable in the camera loop to the attribute_test_mode_on.docs/ax/camera/CONTEXT.md: the definition of unknown optical train now includes Test Mode.Tests
test_camera_interface.py: Test Mode on makes the flag false. Test Mode off makes it true again on a real camera and keeps it false on the debug camera.test_images/pifinder_debug_02.png: the image solves at 10.20 degrees with no gate and with the 2.6.1 gate. It does not solve with any imx296 gate.ruffandnox -s type_hintspass.Not tested
🤖 Generated with Claude Code