Add Scattering Utilities for Consistency + Derivatives - #78
Merged
Conversation
Yurlungur
approved these changes
Aug 5, 2026
Yurlungur
left a comment
Collaborator
There was a problem hiding this comment.
I think the logarithmic derivative is a good idea. If we ever switch gridding strategies, care may be required to compute it carefully but it's unambiguously defined so I think that's a good idea.
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.
In #77, @RyanWollaeger found that the mean scattering variant (when ported to the multigroup setting) did not provide the same utilities as the corresponding multigroup absorption variant. Therein, the necessary critical missing functionality was added. Thanks, @RyanWollaeger! This PR adds a few more so that the two variants are entirely consistent.
While I was at it... downstream we are in need of opacity temperature derivatives at constant density. We could do that entirely downstream, but it is nice to have access to some of the private members when constructing derivatives on MeanOpacity tables. I opted to provide d log(abs_coef) / d log T to accomodate special handling in the low temperature limit downstream and admittedly circumvent concerns around units. Also it nestled nicely into the table format we currently demand. Future development may also provide d (abs_coef) dT = (abs_coef / T) * d log(abs_coef) / dT...