ISISNeutronMuon / MDANSE

MDANSE: Molecular Dynamics Analysis for Neutron Scattering Experiments
https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx
GNU General Public License v3.0
20 stars 4 forks source link

[BUG] When "weights" is used is the calculated result really a total? #375

Open ChiCheng45 opened 5 months ago

ChiCheng45 commented 5 months ago

Description of the error According to the documentation https://mdanse.readthedocs.io/en/protos/pages/parameters.html#weights the "total" property of a result is calculated using the following equations,

image

the first equation is actually the formula for a weighted arithmetic mean https://en.wikipedia.org/wiki/Weighted_arithmetic_mean#Mathematical_definition.

Therefore properties which are calculated with the "weights" setting are actually some sort of weighted arithmetic mean over the different atoms types.

Suggested fix Update the documentation and code so that "total" results calculated with "weights" are referred to as something else.