Fix warning about log-linear frequency spacing#1959
Open
rossjjennings wants to merge 2 commits intonanograv:masterfrom
Open
Fix warning about log-linear frequency spacing#1959rossjjennings wants to merge 2 commits intonanograv:masterfrom
rossjjennings wants to merge 2 commits intonanograv:masterfrom
Conversation
vhaasteren
approved these changes
Jan 20, 2026
Member
vhaasteren
left a comment
There was a problem hiding this comment.
Looks good to me, this is ready for merge
Member
|
Thanks for noticing this @rossjjennings . Those warnings were not covered by the unit tests, and strictly speaking nothing breaks, so that slipped through. Ready to merge |
Contributor
|
I can merge this whenever you are happy. |
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 PR #1877, @vhaasteren introduced a new log-linear frequency spacing mode. Unfortunately, some of the associated code gives rise to a bunch of spurious warnings of the form
when not using the new feature (i.e., using purely linearly-spaced frequencies, corresponding to
logmode=0). These show up becausepint.models.noise_model.get_rednoise_freqs()is passed a positive value off_minby default, regardless oflogmode. Because, withlogmode=0andnlog=None, any value off_minother than 0 orNonetriggers the warning, it shows up even under the default settings.This PR changes the conditions for triggering the warning so that it doesn't show up in the case where
f_minis nonzero butlogmode=0andnlog=None, which is the default when not using log-spaced frequencies. This is safe becausef_minis ignored in this case anyway. I've also edited the warning message to hopefully make it more helpful if it does appear.