SasView / sasmodels

Package for calculation of small angle scattering models using OpenCL.
BSD 3-Clause "New" or "Revised" License
16 stars 28 forks source link

Inconsistency in the description of the onion model #464

Open smk78 opened 3 years ago

smk78 commented 3 years ago

User Sebastian B comments:

Thank you for the detailed documentation of all models. I might have an improvement suggestion (or I misunderstood something) regarding the onion model http://www.sasview.org/docs/user/models/onion.html

It seems to me that

r{out} is identical to r{shell}

and

r{in} is identical to r{shell-1}

but I don't see that written anywhere on this page. I'd suggest to either explain r_in / r_out or to stick with the "shell-1" notation.

This needs checking and, if necessary, rectifying.

butlerpd commented 3 years ago

A first careful look reveals that indeed there is some some confusion in the documentation. Beyond what Sebastian identifies the first set of equations actually uses r and r_shell-1. This itself is confusing and should in fact be r_shell and r_shell-1.

The second and third sets of equations use r_in and r_out for exactly the same thing as I read it. In other words r_in is not r_core it is in fact r_in for that shell. This probably comes about because the c code uses r_in and r_out in a loop. However that code is quite clear and should not be touched lest it unintentionally introduce errors.

I also note that the short "description" string is also using r_in and r_out in the f_shell equation. This may be more problematic? but for consistency should also be labelled the same as the main documentation.

Finally I note that the second and third sets of equation also introduce \rho_in as well as \rho_out and \beta_in/out and \alpha_in/out. I think for consistency we should use the same nomenclature throughout.

I would recommend