-
Notifications
You must be signed in to change notification settings - Fork 484
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
Adds a tolerance for temperatures slightly out of bounds when interpolating #2265
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some feedback for the changes in response to my earlier comment. Besides that and the documentation changes, which look good, I'm not sure I'm familiar enough with the other source files to give more thorough review. I also do not have write access, so my review sadly will not unblock the PR. Maybe you could request review from someone who has write access?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this improvement @joshmay1! Sorry it took me a while to review this in full. I have a few small comments but overall it looks like it's in really good shape.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good now -- thanks for the updates @joshmay1! I'll wait for your response about updating the check when pushing back temperatures for thermal scattering before I merge this.
I think it's good to go now @paulromano. It was indeed reading in libraries multiple times for duplicated values, but only when executing the interpolation tolerance I had just added. |
Thanks @joshmay1! |
This change is targeted at addressing provided temperatures slightly outside of existing cross section temperatures when in interpolation mode. The allowable distance outside of the existing bounds is specified with the
temperature_tolerance
attribute of the settings.For example, if cross sections are available at 300K and 600K and a temperature of 299K is specified, the current code would not allow this as it is unbounded on the lower end. With this change, as long as the difference from the bound to the temperature is within the
temperature_tolerance
, the loaded cross sections will snap to the bound instead of interpolating. The default value of thetemperature_tolerance
is still 10K as this parameter is also used in the nearest method for temperatures.This should close #729.