Skip to content

Add a CaSSIS rational distortion type#512

Open
oleg-alexandrov wants to merge 4 commits into
DOI-USGS:mainfrom
oleg-alexandrov:cassis_support
Open

Add a CaSSIS rational distortion type#512
oleg-alexandrov wants to merge 4 commits into
DOI-USGS:mainfrom
oleg-alexandrov:cassis_support

Conversation

@oleg-alexandrov

@oleg-alexandrov oleg-alexandrov commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

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:

This work is free and unencumbered software released into the public domain. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain.

  • I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

oleg-alexandrov and others added 3 commits June 11, 2026 13:31
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant