Galene¶
Galene is a tool to correct for sample motion in laser scanning fluorescence microscopy data, supporting both intensity-only and fluorescence lifetime imaging (FLIM) data.
Using an approach based on the Lucas–Kanade framework, Galene estimates the sample displacement during each frame relative to a reference frame. Using this information, the FLIM image may be reconstructed accounting for this motion, reassigning each photon arrival to the correct pixel producing a distortion-free image. For more information please see Warren et al. 2017
This documentation will help you get started using Galene. If you use Galene in your paper, please cite us
Getting started¶
System Requirements¶
Galene is fairly computationally intensive and will benefit significantly from a modern multicore CPU with plenty of RAM. As a guideline, we would suggest at least 8 GB of RAM. Only 64 bit processors and operating systems are supported.
Galene can optionally take advantage of modern GPUs from NVIDIA to accelerate motion correction. GPUs must support CUDA compute capability 3.0.
Installing on Windows¶
- Galene is supported on Windows 7 or higher.
- Download the Windows installer from http://flimfit.org/galene.
- Run the installer
- Run Galene from the Start menu
Installing on macOS¶
- Galene is supported on macOS 10.11 El Capitan or above.
- Download the Mac disk image from http://flimfit.org/galene.
- Open the disk image
- Drag Galene to the Applications folder
- Run Galene from the Applications folder
Acquiring data¶
Configuring your microscope¶
Data must be acquired in a ‘time tagged, time resolved’ (TTTR) mode, also known as ‘first in, first out’ (FIFO). At the moment, data acquired using FLIM systems from Becker and Hickl and Picoquant are supported.
If you have TTTR data acquired using a different FLIM system please contact us and we may be able to add support for your data.
The systems should be set up as discussed below.
Picoquant¶
Galene supports data acquired using the PicoHarp 300, TimeHarp 260 and HydraHarp 400 in either the older .pt3 or newer .ptu format. Data should be acquired in a TTTR ‘T3’ mode, the Picoquant acquisition software Symphotime will acquire data in this mode automatically.
Becker and Hickl¶
Galene can read .spc photon stream files recorded by Spcm32/64 in FIFO mode. FIFO imaging mode is available supported the SPC-830, SPC-150, SPC-152, and SPC-154 modules. Note that Spcm64 supports saving larger data files than Spcm32. To set up SPCImage to save .spc files:
- Open the
System Parameters
dialog from the Parameters menu - ① Set
Operation Mode
toFIFO Image
- ② Tick
Save .spc file
- ③ Set
Autosave
toEach cycle
- ④ Set the name of your file in
Spec data file
You can then setup your imaging parameters as normal and acquire data. Spcm32/64 can load the spc data later to convert it to sdt files for loading in SPCImage.
Note that Galene cannot correct for motion in .sdt files, even those acquired in FIFO mode, as the data is histogrammed before saving. This means that we cannot extract the individual frames from the FLIM acquisition.
Optimal scanner parameters¶
Galene is able to correct for motion more effectively when the speed of the motion is slow relative to the time taken to acquire a single frame. Therefore, it is preferable to acquire many fast frames than a few frames more slowly. In general, the following tips can help acquire data in moving samples
- Use a fast scan rate, e.g. >1000Hz line rate
- Use a bidirectional scan where possible
- Reduce the number of pixels acquired in the image where possible
- Try and align fast (i.e. x) axis with direction of movement by rotating the scanner FOV
For more details please see Warren et al. 2017.
Tutorial¶
In this tutorial we describe how to load FLIM data, correct for motion and save the realigned data using Galene. Please also see the video tutorial.
Loading and opening data¶
- Select a folder containing your data using File>Open…
- Double click on an image from the list to open ①
- An intensity mapped FLIM image will open the workspace ②
- Control the lifetime ③ and intensity ④ limits using the options below the image
Correcting for motion¶
- Select the
Warp
motion compensation ① approach using the drop down menu on the right
Tip
The Warp
motion compensation mode takes the microscope scan pattern into account
and in most cases is the best option.
For more about the correction modes and
the options available ② see Correction Modes
- Align the data using the
Realign + Reload
button ③
Viewing the realignment results¶
- The realigned FLIM image ① is shown alongside the individual intensity frames ②.
- Scroll ③ through the aligned or unaligned frames using the
A
button ④ in the realignment window. - By default the first frame will be used as the reference. To select a different frame, press
Use as reference
button ⑤ and realign the data using the Realign + Reload button. - The graph below shows the correlation between the realigned frame and the reference frame in black and the correlation between the unaligned frame and the reference frame in red.
Optimising the realignment results¶
If the realignment results are not satisfactory, the following parameters can be adjusted ①
Realignment Points
controls the number of points in the image used to estimate the displacement during each frame. We have found that the default value of 10 points provides good results across a range of images. If the motion is fast relative to the frame you may need to use more points to accurately estimate the motion. If the realignment appears ‘jittery’, try using fewer points. If the displacement during each frame is relatively small as few as 4 points may be sufficient.Smoothing
controls the degree of smoothing in the x-axis applied to the image before realignment. Increasing the degree of smoothing can improve the realignment when the signal to noise in each frame is low.
- After adjusting these settings, realign the data using
Realign + Reload
②.
Frames which are not well aligned, for example if the sample moves out of the field of view, can degrade the final image. These frames can be rejected by applying thresholds to the realignment results
- Use
Correlation Threshold
to reject frames where the correlation with the reference frame is low. - Use
Coverage Threshold
to reject frames where the displacement was very large. - Apply the thresholds without reprocessing the data by pressing
Reload
③ .
- Use
Saving the realigned data¶
When you are happy with the realignment, press
Save
① to save the data as a histogrammed .ffh file. These can be read directly by FLIMfit or into Matlab using the FlimReaderMex fileYou can also output diagnostics about the fitting ②:
Intensity preview
: save a png of the intensity of the realigned image. This is convenient for quickly assessing which files have been successfully realigned.Frames as movie
: save a tif stack of the aligned and unaligned frames for diagnosticsRealignment information
: save a csv file with the estimated displacements across the frames
To process several files using the same settings, select multiple files and click
Process all selected
⑤.
Correction Modes¶
There are three correction modes which are described below. In most cases, Warp correction is the most appropriate option.
Translation¶
In this mode, each frame is realigned to the reference frame taking a constant x,y translation into account. This mode is appropriate when the sample motion is very slow relative to the frame rate so the distortion within a frame is negligible. This translation is used as an initial estimate by default for the Warp mode, so in general the Warp translation will provide a better result.
- Options
Spatial binning
: Spatially downsamples the data by this factor. Increasing this value can improve the realignment of noisy data at the cost of some realignment precision.Frame binning
: Bins multiple frames together. Increasing this value can improve the realignment of noisy data when the motion over a number of frames is slow.
Warp¶
In this mode, the displacement at multiple points during each frame is estimated. This allows us to correct for motion faster than the frame rate which cause distortions to the image.
Frames which are not well aligned, for example if the sample moves out of the field of view, can degrade the final image. These frames can be rejected by applying thresholds to the realigned frames.
- Options
Realignment Points
: controls the number of points in the image used to estimate the displacement during each frame. We have found that the default value of 10 points provides good results across a range of images. If the motion is fast relative to the frame you may need to use more points to accurately estimate the motion. If the realignment appears ‘jittery’, try using fewer points. If the displacement during each frame is relatively small as few as 4 points may be sufficient.Smoothing
: controls the degree of smoothing in the x-axis applied to the image before realignment. Increasing the degree of smoothing can improve the realignment when the signal to noise in each frame is low.Correlation Threshold
: applied to reject frames where the correlation with the reference frame is low.Coverage Threshold
: applied to reject frames where the displacement was very large.
Citing Galene¶
If you use Galene in your paper, please cite
…
If you use FLIMfit for analysis, please cite
Warren, S. C. et al. Rapid global fitting of large fluorescence lifetime imaging microscopy datasets. PLoS One 8, e70687 (2013).