Skip to content

Conversation

@riclarsson
Copy link
Contributor

This is still a bit of a WIP. But I have implemented linear in tau approximation in fully polarized form.

I also took the time to clean up some documentation. I specifically fixed some weirdities in the description of the Jacobian calculations. (It's now more 1-to-1 with how the code works.)

I also describes the new implementation, but this part specifically is not tested. The forwards is, but only for a few cases.

I need this merged because I need to be able to think of abstractions around the RTE. Currently, this adds variables, which breaks workspace. I could introduce a class to wrap a lot of the RTE, like we did for the atmosphere, but it's still not beautiful to me how that would work.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a linear-in-tau approximation for fully polarized radiative transfer calculations, a method to improve numerical stability when the propagation matrix is large. The implementation includes new workspace variables, methods, and extensive documentation updates that clarify the mathematical formulation of the radiative transfer equation and its Jacobian. While the forward calculation has been tested for some cases, the implementation is marked as work-in-progress and the Jacobian calculations remain untested.

Key changes:

  • Added linear-in-tau RT approximation with new workspace variables (spectral_lintau_path, spectral_lintau_jac_path) and methods (spectral_tramat_pathLinearInTauFromPath, spectral_radLinearInTauStepByStepEmission)
  • Refactored the inverse propagation matrix calculation by introducing an adjugate function to improve code clarity
  • Enhanced documentation with clearer mathematical notation and detailed explanation of the linear source function approximation

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/workspace_variables.cpp Adds two new workspace variables for linear-in-tau operators and their Jacobian derivatives
src/workspace_methods.cpp Defines two new workspace methods for computing transmission matrices and spectral radiance using linear-in-tau approximation
src/workspace_meta_methods.cpp Adds meta method for clearsky emission calculations with linear-in-tau
src/python_interface/py_rtepack.cpp Exposes new evolve_operator methods to Python interface
src/m_spectral_radiance.cc Implements the main functions for linear-in-tau transmission and radiance calculations
src/core/rtepack/rtepack_transmission.h Declares new evolve_operator methods and overloaded two_level_exp function
src/core/rtepack/rtepack_transmission.cc Implements evolve_operator (Lambda operator), its derivative, and refactored matrix exponential calculations
src/core/rtepack/rtepack_rtestep.h Declares new step-by-step solver for linear-in-J approximation
src/core/rtepack/rtepack_rtestep.cc Implements the linear-in-J step-by-step propagation algorithm
src/core/rtepack/rtepack_propagation_matrix.h Adds determinant function for propagation matrices
src/core/rtepack/rtepack_multitype.h Refactors inverse function by extracting adjugate calculation, adds required include
src/core/rtepack/rtepack_mueller_matrix.h Adds unary minus operator for Mueller matrices
doc/arts/concept.radiative_transfer.rst Extensively updates documentation with clearer notation, fixes Jacobian description, and adds comprehensive linear source function section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@riclarsson riclarsson merged commit 368832e into atmtools:main Jan 4, 2026
14 checks passed
@riclarsson riclarsson deleted the lintau branch January 4, 2026 08:51
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