Eggeling-Lab-Microscope-Software / TRAIT2D

TRAIT2D is a cross-platform Python software package with compilable graphical user interfaces (GUIs) to support Single Particle Tracking experiments.
GNU General Public License v3.0
10 stars 10 forks source link

New msd calculation, error calculation and renaming #67

Closed Zatyrus closed 2 years ago

Zatyrus commented 2 years ago

I have implemented the new and faster msd calculation cycle that now also includes the calculation of the msd error in two ways.

First, is the old version now named self._msd_SEM (Standard Error of the Mean) for each point of the MSD. This was formally used and does not fit our purpose any more since we have enough data. It is also being calculated but now kept under the label self._msd_SEM stores as a variable inside the Trackobject.

Second, is the calculation of the actual standard deviation for each point of the MSD curve. It is much larger than the former used error and is now stored in the self._msd_error variable inside the Track object instead of the legacy SEM.

The change of errors and their calculation was discussed with Francesco Reina and happens in his consent as the newer version fits better to the issues we are about to tackle.

Because of the calculation changes and the drastic change of the msd_error, unit test fails are expected. To reproduce a result very similar to the legacy version, you can use the self._msd_SEM as the MSD error and review the plots.

Lastly, I have made some small renaming changes to the simulators module where I changed display_trajectory to plot_trajectory for more similarity in naming functions improving user friendliness.

john-wigg commented 2 years ago

I'll have a look at this when I have time later this week to update the tests!

Zatyrus commented 2 years ago

I have reviewed the comments you have made and find them to be accurate. Furthermore, I have now changed the things you rightfully mentioned above and re-pushed the branch.

Everything should be in order now.

Just to directly mention what I have done:

john-wigg commented 2 years ago

Thanks!