Add nu_star (collisionality) to post-processed outputs#2103
Open
AndrewTKent wants to merge 1 commit intogoogle-deepmind:mainfrom
Open
Add nu_star (collisionality) to post-processed outputs#2103AndrewTKent wants to merge 1 commit intogoogle-deepmind:mainfrom
AndrewTKent wants to merge 1 commit intogoogle-deepmind:mainfrom
Conversation
Exposes the electron-ion collisionality (nu_star) already computed by collisions.calc_nu_star() as a post-processed output on the face grid. Uses collisionality_multiplier=1.0 for the physical value (the non-unity multiplier in QLKNN is a model-specific calibration factor, not physics). Useful for particle transport predictions and analysis. Closes google-deepmind#2094
Nush395
approved these changes
Apr 14, 2026
Collaborator
Nush395
left a comment
There was a problem hiding this comment.
Thanks for the contribution! Can you also regenerate the references? This should be straightforward to do following https://torax.readthedocs.io/en/v1.3.0/contribution_tips.html#regenerating-unit-test-references
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.
Summary
nu_star) as a post-processed output on the face gridcollisions.calc_nu_star()withcollisionality_multiplier=1.0(physical value, not the QLKNN model-specific calibration factor)torax/_src/output_tools/post_processing.py(import, dataclass field + docstring,zeros(),make_post_processed_outputs())Closes #2094
Notes for reviewers
PostProcessedOutputsmeans the.ncreference files need regeneration (same pattern as theP_LH_delabieaddition in 83197e3).test_full_output_matches_referenceandtest_simulation_with_restartwill fail until then.collisionality_multiplier=1.0: The QLKNN multiplier is a model-calibration factor (e.g., 0.25 for qlknn_10d to compensate for a legacy collision operator mismatch). The output exposes the true physical collisionality — comment in code explains this choice.Test plan
.ncreference filespytest torax/_src/output_tools/tests/post_processing_test.pypytest torax/_src/output_tools/tests/output_test.pypytest torax/tests/sim_test.py