Repository navigation
Adds a tolerance for temperatures slightly out of bounds when interpolating - #2265
Conversation
lewisgross1296
left a comment
There was a problem hiding this comment.
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?
paulromano
left a comment
There was a problem hiding this comment.
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.
paulromano
left a comment
There was a problem hiding this comment.
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! |
Adds a tolerance for temperatures slightly out of bounds when interpolating
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_toleranceattribute 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_toleranceis still 10K as this parameter is also used in the nearest method for temperatures.This should close #729.