zitmen / thunderstorm

ThunderSTORM: a comprehensive ImageJ plugin for SMLM data analysis and super-resolution imaging
http://zitmen.github.io/thunderstorm/
GNU General Public License v3.0
91 stars 42 forks source link

Bug in Normalized Gaussian reconstruction #48

Closed cleterrier closed 7 years ago

cleterrier commented 7 years ago

ThunderSTORM (latest build from 07-27-16), latest Fiji (ImageJ 1.51f) under Java 8 (102) on OSX El Capitan (10.11.5).

I think there is a bug in the "Normalized Gaussian" reconstruction mode. When the "force" option for the lateral uncertainty is unchecked, the reconstruction is supposed to be made from the localization results "uncertainty_xy" value (on a per-localization basis). This is the case if the "Lateral Uncertainty" box contains a large value (larger than the typical uncertainties contained in the localizations results). However, if this box contains a small value (for example 1 nm), then it modifies the reconstruction even if the "force" box is unchecked. The resulting Gaussians aren't normalized anymore! I have the impression that it limits the plotting to 3*1 nm, but with the intensity of the larger gaussian (corresponding to the uncertainty_xy value found in the localization results).

Here is how to replicate:

The test file has two rows of five localizations with uncertainties of 4, 8, 16, 32 and 64 nm. You should obtain two reconstructions: both are with "force" unchecked, but one with "1.0" nm in the Lateral Uncertainty box (corresponding to the attached _Test_TS(001)Rec.tif), the other with "100" nm (corresponding to the attached _Test_TS(100)Rec.tif). The correct reconstruction is "Test_TS(100)_Rec": test_ts 100 _rec whereas "Test_TS(001)_Rec" is wrong: test_ts 001 _rec

As it is, having a small value in the "Lateral Uncertainty" box can generate completely wrong reconstructions, so I think it is a serious bug.

zitmen commented 7 years ago

This should be correct. fixed_gaussian_rendering