FCS-analysis / PyCorrFit

data analysis and fitting software for fluorescence correlation spectroscopy (FCS)
pycorrfit.craban.de
Other
45 stars 13 forks source link

Weighted fitting #194

Open Antoine-DELON opened 4 years ago

Antoine-DELON commented 4 years ago

The options for fitting include, as reported by the documentation: "If the current page is an average, then the standard deviation from the curves that were used to create the average can be used as weights."

It sounds better to rather use the SEM (standard error of the mean) from the curves to weight the fit. In this case, the reduced khi-2 is expected to fall around the mean value 1 (with some statistical distribution, of course).

Do you agree about this and, if so, can it be fixed?

Regards, Antoine

PS: thx for PyCorrFit which is really a simple but very efficient and well suited FCS soft.

paulmueller commented 4 years ago

This is certainly possible. The weights are computed directly in the averaging tool (https://github.com/FCS-analysis/PyCorrFit/blob/b257f62e0c9d7ccaa9e39689cf172e288afe06b3/pycorrfit/gui/tools/average.py#L294). It would probably make sense to allow the user to choose which weights to use (SD or SEM).

I would rather not like to remove the SD option for backwards-compatibility reasons. In order to make the change, the following tasks would have to be performed:

paulmueller commented 4 years ago

Also related to #124, #122.