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
92 stars 42 forks source link

Failure to generate 3D calibration #3

Closed zitmen closed 9 years ago

zitmen commented 9 years ago
What steps will reproduce the problem?
1. Load the calibration stack found here:
http://www.cleterrier.net/up/Z_calibration.tif

2. Launch the 3D calibration with the parameters as specified in the screenshots attached
 (main dialog and camera setup)

What is the expected output? What do you see instead?
The calibtation fails with the following error :

(Fiji Is Just) ImageJ 1.48r; Java 1.6.0_65 [64-bit]; Mac OS X 10.9.1; 131MB of 6491MB
(2%)

java.lang.ArrayIndexOutOfBoundsException: 0
    at cz.cuni.lf1.lge.ThunderSTORM.calibration.IterativeQuadraticFitting.fitParams(IterativeQuadraticFitting.java:71)
    at cz.cuni.lf1.lge.ThunderSTORM.calibration.CalibrationProcess.fitQuadraticPolynomials(CalibrationProcess.java:182)
    at cz.cuni.lf1.lge.ThunderSTORM.CylindricalLensCalibrationPlugin.run(CylindricalLensCalibrationPlugin.java:124)
    at ij.IJ.runUserPlugIn(IJ.java:199)
    at ij.IJ.runPlugIn(IJ.java:163)
    at ij.Executer.runCommand(Executer.java:131)
    at ij.Executer.run(Executer.java:64)
    at java.lang.Thread.run(Thread.java:695)

What version of the product are you using? On what operating system?

(Fiji Is Just) ImageJ 1.48r; Java 1.6.0_65 [64-bit]; Mac OS X 10.9.1

Please provide any additional information below.

I'm not sure about the camera setup dialog, I've entered the camera gain before EM
gain applied (63.7 photons/AD counts), and with an EM gain of 300 the actual number
of photons/AD counts is 0.212

Original issue reported on code.google.com by lechristophe on 2014-02-24 14:17:37


zitmen commented 9 years ago
Hello, thank you for the feedback. We will handle the exception and show a reasonable
error message instead.

Solution for your problem is to make the fitting radius larger. Currently it is set
to 2 which means that a single molecule can't be larger than 5px (2*2+1 -- it is a
circle with radius 2 + the center pixel). When I looked at the your calibration data,
the seem to be ~10px large when they expand to elipses. Setting the fitting radius
to 5 (2*5+1 px) took care of the problem.

Original issue reported on code.google.com by zitmen on 2014-02-24 16:41:04


zitmen commented 9 years ago
Citing: "I'm not sure about the camera setup dialog, I've entered the camera gain before
EM gain applied (63.7 photons/AD counts), and with an EM gain of 300 the actual number
of photons/AD counts is 0.212"

Response: number of photons per single AD count is not affected by EM gain

Original issue reported on code.google.com by zitmen on 2014-02-25 16:29:34

zitmen commented 9 years ago
fixed in revision c78ca77f1f55

Original issue reported on code.google.com by zitmen on 2014-02-25 17:21:35

zitmen commented 9 years ago
Citing: "number of photons per single AD count is not affected by EM gain"
Is that really so? On the Andor site it says signal-counts*pre-amp/(EM-gain*QE(@wavelength-of-interest))
[http://www.andor.com/learning-academy/count-convert-quantifying-data-in-electrons-and-photons]
... Am I missing something?

Thanks a lot for clarification!

Original issue reported on code.google.com by zuzu.qmail on 2014-03-03 16:03:57

zitmen commented 9 years ago
Well I guess it depends on what you call ""number of photons per single AD count" I
guess. But I'm quite sure that the final intensity value of the pixels depends on the
EM gain. So to convert it into photons, you have to take into account both the A/D
gain and the EM gain. I don't agree with the use of the QE though: if you want to know
the precision of the localization, you take into account the photoelectrons that have
been detected, not the one that you didn't due to the lack of camera sensitivity. IE
a camera with a very low QE will not result in more precision in localization than
a camera with high QE, for the same number of photoelectrons detected.

Original issue reported on code.google.com by lechristophe on 2014-03-03 16:09:46

zitmen commented 9 years ago
"AD count" in our case is the value of "pre-amp" on the Andor site. See the help in
the Camera setup dialog for explanation of the used variables. The equation is the
same as on the Andor site, only we do not take QE into account.

Original issue reported on code.google.com by krizekp1 on 2014-03-03 16:48:47