Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too verbose Kr83m deltaT range warning #97

Closed
sophiafarrell opened this issue Mar 8, 2021 · 2 comments
Closed

Too verbose Kr83m deltaT range warning #97

sophiafarrell opened this issue Mar 8, 2021 · 2 comments

Comments

@sophiafarrell
Copy link
Contributor

The new Kr83m deltaT warning alerts users of deltaT being out of bounds but should only be called once so that those simulating many kr83m yields do not get too many warnings.
Relevant PR: #92
Code:
The proposed solution is as follows (so that it appears once, whether or not you are in a loop or vectorizing.)
Replace the new code with something to the extent of

bool reported_low_deltaT = false; // determining where this goes will be the trick but I have a few ideas. 

 GetYieldKr83m(**args) {
// do a bunch of stuff in between here. 
    if (deltaT_ns < 100 && energy < 41.5 && reported_low_deltaT == false)  {
       reported_low_deltaT = true;
       cerr << "\tWARNING! Past Kr83m model fit validity region. Details: "
       << " deltaT_ns is <100 ns and your input energy is either 32.1 or 9.4 keV. "
       << " Data for separated Kr83m decays does not yet exist for deltaT_ns <100 ns. "
       << " 9.4 & 32.1 keV yields are still summed to physically accurate result, but individually will be nonsensical." << endl;
     }
}

This ideally means the warning only outputs once as long as we initialize the reported boolean outside of the function (inside would be a slightly different story, but also an option.)

Do not have time to fix this this week probably but as we discussed this should be an open issue so we don't forget.

@sophiafarrell
Copy link
Contributor Author

@vvelan @mszydagis Here's the Kr83m warning issue, almost forgot it!

@vvelan
Copy link
Collaborator

vvelan commented Mar 8, 2021 via email

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

No branches or pull requests

3 participants