SasView/sasview

SLD calculator does not respect density in formula

Closed this issue · 0 comments

Describe the bug
for mixtures, the SLD calculator supports adding the individual densities in line rather than having to calculate them manually. This works in the online version (https://www.ncnr.nist.gov/resources/activation/) assuming the density box is left empty. However leaving that box empty in SasView still assumes 1.0 (incorrect) and ignores the in line densities. eg entering 50%vol H2O@1 // D2O@1.1 will act as if the density of the mixture is 1 or whatever value the user puts into the density box. This defeats the purpose.

To Reproduce

enter the above equation into the calculator, the SLD should be 2.887 but SasView will return 2.750 (what you would get assuming a density of 1 for the mixture) as given by the web calculator

SasView version (please complete the following information):

  • Version: 6.0.0b2 However it seems to also exist in 5.0.6

Operating system (please complete the following information):

  • OS: Windows 10

Additional context
This seems to be a known bug and is mentioned in the documentation which tells the user to manually calculate the mixture density themselves and input that.