Repository navigation
Rework series, Tier B-02, bug fixes in atmo_dispersion (shifts) - #35
Open
Yashvi-Sharma wants to merge 4 commits into
Open
Yashvi-Sharma wants to merge 4 commits into
Yashvi-Sharma wants to merge 4 commits into
Conversation
ShiftFoV3D chose between "roll" and "map_coords" from the median shift of whichever FOV reached it first, then cached that choice on self.meta for the lifetime of the effect. Because one instance is shared across every FOV of an OpticalTrain, the first FOV permanently decided the algorithm for all later ones, including wavelength ranges where the shift is sub-pixel or very large. The same stickiness disagreed with _padded_header, which is called from observe() before the first apply_to and so sized its padding under the map_coords assumption regardless of what would later be applied. The method is a physical choice about how the shift is applied, so it is now required. Both production configs already set it (MaunaKea.yaml, XSHOOTER_SPEC .yaml). ADCShift builds an inner ADShift purely to obtain uncorrected shift amounts; that one inherits the configured method rather than needing its own. Also in this file: - drop the duplicate SkyCoord import and the unused Any import - name the 0.1 pixel shift quantisation, which is a floor on dispersion accuracy and not just a caching detail - return the cached sparse shift operator read-only, as psfs/analytical.py already does for its cached Gauss-Legendre rule - delete ADShift.apply_to, a pure pass-through to super() - annotate ADCShift.z_order as a ClassVar, consistent with the other two refractive_index and compressibility had no direct test; they now check against published Ciddor 1996 values, including n = 1.00027653 at the reference condition and Z_a = 0.9995922115 for dry air. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AGENTS.md asks for ASCII-only source. refractive_index used literal Unicode Greek letters as variable names (sigma, alpha, beta, gamma and four rho variants), and the unit comments carried middle dot, micro and degree signs. Renames only. Verified the physics is untouched: n at Ciddor's reference condition is bit-identical at 1.0002765302104355, as is Z_a at 0.9995922115359966. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 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.
Please refer to the included .md for a summary of the changes.