Scanbox makes sure the data acquisition of the signals from the photo-multipliers are synchronized to the laser pulse. Let me explain why. Suppose you run an asynchronous data acquisition clock at 25Mhz while the laser has a pulse rate of 80Mhz. Then you may obtain images of single cells that look like this:
This is a zoomed in view of a single cell labeled with GCamp6s. Notice something funny about this picture? If you look along individual lines you will see that bright pixels are often next to black pixels. If you look at another frame you will see the same pattern, except that the location of bright/dark pixels would have shifted.
What’s going on?
What is happening is that the phase of the 25Mhz clock relative to the laser pulses changes over time, producing a beat pattern. For these choice of frequencies, the beating pattern has a period of 5 pixels. This is because 5 pixels @ 25Mhz is the same as 16 pulses @ 80Mhz, both of which are equal to 200ns. The pattern is obvious when you compute the average auto-correlation of the fluctuations of the lines:
Yuck… Two pixels away there is a 40% anti-correlation in the signal! How do you get rid of this problem? Running the sampling clock at 20Mhz does not solve it. Why? Because the laser does not run exactly at 80Mhz so the relative phase will still drift. Moreover, the actual frequency of the laser changes with your selection of the wavelength and we want a solution that will work for all wavelengths. Another partial solution is to temporally filter your signal by selecting PMT amplifiers with a relatively low high-cut frequency. This, however, will decrease the spatial resolution along the resonant axis and will not solve the problem if your selection of frequencies causes the phase to drift slowly in time. In this case, the overall brightness of your images will drift slowly back and forth between bright and dark levels. The simplest solution to this problem is to synchronize the data acquisition with your laser. Indeed, then your single frames look nicer (note image is from a different cell) and you get sharp bright/dark edges with single-pixel resolution.
In Scanbox this synchronization is simply achieved by ‘cleaning-up’ the sync out output of the Chameleon with a BBP-70+ band pass filter from Mini-circuits. Then, the level and slope of the trigger in the Alazartech board is fine-tuned to find the relative phase that achieves a maximal signal. The resulting settings will depend on the PMT filters that you use, but will generate the crispiest, noise-free images you optics can support.
So, if you see the sync-out of your laser not connected to anything, and your single images look like the one at the top, it is time to get this fixed. Your data will thank you.
Thanks for the text and the software – very interesting!
I use a slightly different strategy on our 2p scopes with the Alazar ATS9440:
To further optimize lock-in sampling I included an Ortec 935 nanosecond delay (bunch of cables spliced together) and an optical constant fraction discriminator (Becker&Hickl OCF-401) to get a proper wavelength-independent trigger from the laser and to be able to fine-tune the sampling phase.
Optimizing the fluorescence readout relative to the pulse-phase makes a huge difference. In this example I imaged a fluorescine sea and simply stepped through the 12ns cycle:
http://goo.gl/l0PBYz
I wonder how this strategy compares to massive oversampling and online 80Mhz band-pass filtering with FPGA boards that some labs now use [1].
Best,
T
1. Leinweber, M. et al. Two-photon Calcium Imaging in Mice Navigating a Virtual Reality Environment. J. Vis. Exp. e50885 (2014). doi:10.3791/50885
Thanks for the comment Tobias. Indeed, optimizing the fluorescence readout makes a huge difference — thanks for sharing that graph. My initial thought is that massive oversampling is an overkill given that you can tune the system once and leave it alone… but I have not read the paper you cited yet. I’ll take a look.
It’s already 4 years old, but here’s one more question. Since you are using the Alazar ATS9440, I’m wondering whether you have used its upgrade to a wide bandwidth (120 MHz, instead of the normal 65 MHz). My understanding is that the normal ATS9440 configuration includes a 65 MHz (-3 dB) filtering, which would smear out the fluorescence over a time window that is almost as long as the 12.5 ns between two laser pulses. So I assume you have somehow upgraded to the 120 MHz input bandwidth? Or am I wrong?
We have the standard. It’s a single pole filter, I think — so a slow roll off. Not sure how much we would gain for the 120Mhz version. The upgrade is not cheap. Do you have the wide bandwidth version? Did you make any comparisons between the two?
We do not have the wide bandwidth version, and for an upgrade I would have to ship the board to the US and back, so I could not make any comparison.
I would guess that the 65MHz version smears out PMT noise events over several nanoseconds; if one could avoid this smear-out for laser pulse-triggered acquisition, one could probably increase the PMT gain by a lot without contaminating the signal.
This is only an issue for very larger fields where PMT signals, not optics, limits the resolution of the images. The weird autocorrelation is due to lack of an appropriate anti-aliasing filter before sampling. But I agree that a lock-in sampling (or amplification) is in principle the most optimal thing to do.
Clarification: by appropriate filter I mean low-pass filter matched to the laser pulse rate. Also the optimal thing to do is first photon counting (to get rid of electrical noise) then lock-in sampling. But then again, for functional imaging signals are limited by shot noise, not electrical noise.
Looking forward to trying out scan box.
Indeed, if you are not filtering the single-electron responses the best thing you can do is photon counting.
so you routinely low-pass filter your signals before digitizing? Using something like the mini-circuits BLP-90+, I assume (if not: what do you use)? Does this make a difference for you? Why not band-pass filter it? Cheers,T
We don’t… but maybe you are asking Vincent… we use this Edmund amplifier — http://www.edmundoptics.com/electro-optics/amplifiers/high-speed-current-amplifier/2802?#products (the high-speed version)
yes – we use exaclty these on our custom scopes as well. Just out of curiosity: What are your settings – 10^4 gain at 80MHz bandwidth?
I always wondered if filtering makes sense… I assumed that a 80MHz bandpass would be beneficial but I never tried it. Vincent?
Settings may vary depending on the indicator… for Gcamp6s we used 10^4 and 80Mhz bandwidth. I am not sure how 80MHz-bandpass would help. Depending on the filter Q-factor the impulse response would probably ring for a few pixels, again introducing some undesirable correlations between them.
We are considering changing our pre-amp to the fempto one mentioned by Dario and Tobias but I am also concerned with ringing and overshoot. Our current pre-amp is a bit slow (compared to the pixel clock) giving us rectangular pixels, but at least it adds minimal distortions to the PMT impulse. I’ve contacted fempto for additional info about this amplifier without luck. I don’t suppose any of you could post a photo of how PMT counts look coming out of this pre-amp?
You are talking about the Edmund Optics amplifier, right? I will try to post a figure when I get back to the Lab…
I think we are talking about the same amp made by fempto:
http://www.femto.de/en/products/current-amplifiers/variable-gain-up-to-200-mhz-dhpca.html
Here in France we would buy it from a different distributor then EO, but I assume they are otherwise the same. I appreciate the help.
Do you have images from the two conditions from the same cell and for a range of signal levels?
We collected a few examples some time back now, but have not gone back to asynchronous sampling since then…