imodpasteur / ZOLA-3D

Zernike Optimized Localization Algorithm for 3D single molecule localizations
GNU General Public License v3.0
15 stars 3 forks source link

ThorLabs DM settings from model PSF #8

Open VVvanL opened 5 years ago

VVvanL commented 5 years ago

We have been working to replicate your 3D ZOLA system and we have a question regarding PSF shaping. When using your software to model an optimized PSF for a desired axial range, we get a .csv file which contains the phase values for the fifteen Zernike Coefficients. It isn’t immediately evident to us as to how to translate these values to the sliders in the Thorlabs DM software. It may be that we are missing something obvious, but could you inform us on how to do this.

Thanks so much.

benoitbenoit commented 5 years ago

Hello, Indeed, you can use ZOLA to estimate Zernike coeficients of optimized PSF. Note that you can export the data even in csv or json format. To translate this coefficients to Thorlabs DM, we don't have any solution yet. Maybe you could do a calibration procedure such as: --> 1 record calibration image setting all actuator to 0 and retrieve the phase. --> Move actuators one by one and retrieve the phase for each change. --> Check the calibration files and how the Zernike coefficients change for each actuator. Maybe there is a linear relation between Zernike coefficients and actuator amplitude. If there is, you could inverse the matrix to get actuator amplitudes according to Zernike coefficients. Andrey, do you have experience with that ? Thanks, Benoit

aaristov commented 5 years ago

Hi @VVvanL,

Thanks for your interest in ZOLA.

If I'm not wrong, ZOLA uses ANSI numbering, while Thorlabs firmware uses Noll indices (https://en.wikipedia.org/wiki/Zernike_polynomials#OSA/ANSI_standard_indices). That can give you a rough idea of the dials to move. As for amplitudes, it is explicitly said in the DM manual, that they have no idea how the dial amplitudes are related to the actual Zernike values. Calibration values would heavily depend on multiple factors such as pupil conjugation, temperature of the mirror etc. Other than by calibration, you can't really link ZOLA and DM. You can check this publication describing such calibration in details: https://www.nature.com/articles/s41592-018-0053-8#Sec2.

Best, Andrey