Repository navigation
Report phase input in OPD metres - #10
Merged
Merged
Conversation
OpticalResult.opd_m and the wfs_input_opd_rms_m metadata carried the raw input, so phase input was recorded in radians under a metres name. Both sensors now pass the input through WavefrontModel.input_opd, which converts phase at the reference wavelength and returns OPD input unchanged. 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.
Problem
With
input.quantity = "phase", both sensors put the raw input intoOpticalResult.opd_m. Its RMS was then recorded aswfs_input_opd_rms_min every frame's metadata. A 13 nm wavefront supplied as phase was therefore recorded as 0.083 m. Downstream users ofopd_mthat assume metres (e.g.examples/keck_haka/simulate.pymultiplies by 1e9) were off by the same factor. The detector images were always correct, because the optics go throughWavefrontModel.opd, which converts. Spotted during the aocore migration (#9).Fix
The new
WavefrontModel.input_opd(value)returns OPD input unchanged and converts phase atreference_wavelength_m(aocore.phase_to_opd). The Shack-Hartmann and pyramid engines both buildOpticalResult.opd_mthrough it, and the field now has a docstring.Tests
test_phase_input_reports_its_opd_in_metres(SH and pyramid): the same wavefront given as OPD and as phase gives the samewfs_input_opd_rms_m(rel 1e-12), the sameopd_mand the same image. Both cases fail onmain(0.083 vs 1.3e-8).main.🤖 Generated with Claude Code