Fix the OmegaIm default: drop the int cast on LargeValue - #63
Draft
aoymt wants to merge 1 commit into
Draft
Conversation
The spectrum default was computed as 0.01 * (int)StdI->LargeValue, truncating the fractional part of LargeValue: for LargeValue < 1 the default collapsed to exactly 0, and for any non-integer LargeValue the intended 0.01 * LargeValue was rounded down to the previous 0.01 step. Survey over the reference suite (65 modpara.def with OmegaIm): 34 cases used the truncated default and change; 24 have integer LargeValue (unchanged); 7 set OmegaIm explicitly (unchanged). The reference files are updated surgically - only the OmegaIm column of the OmegaMax / OmegaMin lines changes; base-mode integration passes 94/94. Behavior change: HPhi spectrum / time-evolution runs that relied on the truncated default will see a slightly larger OmegaIm (or a non-zero one where it used to be 0). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
StdFace_main.ccomputed the spectrum default asThe
(int)cast truncatesLargeValue: forLargeValue < 1thedefault collapses to exactly 0, and for any non-integer
LargeValuethe presumably intended0.01 * LargeValueis roundeddown to the previous 0.01 step (e.g.
LargeValue = 6.75gaveOmegaIm = 0.06instead of0.0675).This PR drops the cast and updates the affected reference files.
Impact (measured over the reference suite)
Of the 65
modpara.defreferences containing OmegaIm:The 34 reference updates touch only the OmegaIm column of the
OmegaMax/OmegaMinlines (69 changed lines total); the base-modeintegration suite passes 94/94 with the fix.
Behavior change
HPhi spectrum / time-evolution runs that relied on the default will see
a slightly larger
OmegaIm(or a non-zero one where it used to be 0for weakly-coupled systems). Users who need the old value can set
OmegaImexplicitly. Suggest a release-note entry.Notes for reviewers
develophead (themomentum-mode additions to
StdFace_main.cdo not overlap thischange); the base-mode suite passes 95/95 on the merged tree.
pytest (3.10)CI job may fail on this branch for an unrelated,pre-existing reason (
tomllibis Python 3.11+ stdlib; fixed on thePython development line). This PR touches only
src/andtest/*/ref/.🤖 Generated with Claude Code