If you have been using the Optotune, you must have noticed that the values displayed within the optotune panel for the setting of the slider and the parameters of the z-scanning waveform are unit-less and not very useful.
The latest update to Scanbox allows you to calibrate the Optotune and have all the units within the Optotune panel in micrometers.
A new configuration variable “optocal” in scanbox_config.m can be either empty or contain calibration data. If optocal is empty, Scanbox behaves as it has done up to now — showing the unit-less values.
Start by setting optocal=.
To calibrate simply take a green fluorescent slide and make a small marking on its surface. Small dots with a fine, black sharpie should do. Focus the microscope near the very top of the slide and pick one feature with the optotune slider set at zero. Now, zero the position counters. Our first point, corresponding to pairs of (values, depth) is (0,0).
Move the optotune slider up to a value near 200. Then, compensate by lowering the objective (z-position) to bring back the feature you selected into focus. Once this is done, write down your next pair (value, depth), as the value of the slider and the depth you read in the position panel (or in Knobby). Continue this process, increasing the value of the optotune slider in steps of ~200, up to a value of ~2000.
Here is the set of measurements I obtained in my setup:
The curve saturates at a value of ~1760. This is because the current source has reached its maximum output voltage. The range of depths spanned by the optotune is ~340um (vertical axis). The smooth rising part of the curve, before saturation, is well approximated by a second-order polynomial (red curve). To obtain the values of the coefficients use Matlab’s polyfit function by calling “polyfit(vals,depth,2)” (don’t include the saturating part of the curve!). The coefficients of these polynomial are what the optocal variable should be set to. In my case, I get the optimal coefficients to be [0.0001 0.0732 1.3162] and, therefore, I modified the config file so that optocal = [0.0001 0.0732 1.3162].
Once the optocal variable is set, you can restart Scanbox. The result should be that all the values within the Optotune panel will read in microns (as shown on the left). This includes the slider and the parameters to the waveforms. Moreover, as the function is slightly nonlinear, the actual waveforms will be linearized accordingly — so a linear ramp should very closely approximate a linear change in depth.
Does this calibration need to be done for each objective lens separately? I imagine that the relationship between change in collimation (induced by the ETL) and change in focal plane depends on the objective’s properties.
ETL calibration will be close to a scaling of m1^2/m2^2 where m is magnification — but yes, it requires a proper calibration if you switch objectives.
Makes sense – so I can establish one optocal array for each objective, store these in the config file, and uncomment whichever one is actively in use prior to startup.
For comparing objectives under similar conditions, I wonder: is it possible to change the value of a configuration setting and have these changes “seen” by scanbox (and reflected in the GUI, here being the ETL panel) on the fly, i.e. without restarting scanbox?
I can change the optocal to have different entries for different objectives. Then you will be able to select the objective from a pull-down menu to activate the different calibration tables.
This sounds good. I wonder if there are other properties that should/could be stored per-objective (or per-condition, more generally)? E.g. the bidi-alignment is magnification-specific, so would it also be objective-specific? And while we’re on the topic – would wavelength matter too? Asking this now, before you make changes to GUI and config, in case some of these things might influence your design choices.
I realize most experiments involved 1 objective and 1 wavelength …
Bidi-alignment is independent of objective magnification/wavelength — just a function of the timing of the resonant scanner and data acquisition card.