Add a CaSSIS rational distortion type#512
Open
oleg-alexandrov wants to merge 4 commits into
Open
Conversation
Add a CASSIS DistortionType implementing the TGO CaSSIS distortion (Tulyakov/Ivanov, EPFL), matching ISIS TgoCassisDistortionMap. The model is a ratio of quadratics with basis chi = [x^2, x*y, y^2, x, y, 1]; each direction uses three 6-vectors, so x_out = (A1.chi)/(A3.chi), etc. The 36 coefficients are A1_corr,A2_corr,A3_corr (distorted->undistorted, used in removeDistortion) and A1_dist,A2_dist,A3_dist (undistorted->distorted, used in applyDistortion). Both directions are closed form. Includes the ISIS off-CCD identity guard. Wires CASSIS through the json-string, int-enum, and coefficient-extraction dispatch in Utilities.cpp. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add unit tests for the CASSIS distortion type imitating the existing transverse and kplo_shadowcam tests: removeDistortion and applyDistortion against independently computed expected values (real coefficients from tgoCassisAddendum007.ti), an apply/remove round trip, the off-CCD identity guard, the coefficient-count guard, and the json-string and ALE int-enum dispatch mappings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The CASSIS distortion type added here references ale::DistortionType::CASSIS, which lives in the companion ALE PR (DOI-USGS/ale#720) and is not yet on ale main, so the build fails with "CASSIS is not a member of ale::DistortionType". Point the ale submodule at oleg-alexandrov/ale cassis_support so CI can build and test. This must be reverted to ale main once ale#720 is merged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 task
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.
Adds a CASSIS distortion type for the TGO CaSSIS camera, implementing the rational ratio-of-quadratics model by Tulyakov and Ivanov (EPFL) that ISIS uses in TgoCassisDistortionMap. CASSIS is added to the DistortionType enum and wired through the json-name, ALE integer-enum, and coefficient-extraction dispatch.
This pairs with the companion ALE TGO CaSSIS driver change in DOI-USGS/ale#720, which emits these coefficients. Together, cam_test agreement between the ISIS and CSM cameras reaches about 7e-4 pixel (median) on real CaSSIS framelets. Unit tests are added in DistortionTests.cpp: remove, apply, an apply-then-remove round trip, the off-CCD identity, the coefficient-count guard, and the json and integer enum mappings. A CHANGELOG entry is included.
Note on the ale submodule: this code uses ale::DistortionType::CASSIS, which is added in the companion ALE PR (DOI-USGS/ale#720) and is not yet on ale main. So, for now, the ale submodule here is temporarily pointed at the cassis branch of that PR, so this builds and the tests pass. Once DOI-USGS/ale#720 is merged, the submodule will be pointed back to ale main.
Developed with assistance from Claude (Anthropic).
Licensing
This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words: