![]() |
EPFLSTILOBMarcel LeuteneggerAbout MATLAB toolbox Flex02-xxD/C USB correlator interface |
---|
MATLAB toolbox
Double class
Extended class
Single class
Flex99-12C correlator
Flex02-0xD correlator
Vector functions
MEX-Builder
The Flex02-01D/C, Flex02-08D/C and Flex02-12D/C by Correlator.com are USB correlators for single- and dual-channel auto- and cross-correlation. These correlators simultaneously calculate up to four auto- and cross-correlations while recording the raw photon traces and the photon counting statistics (histograms). They are well-suited for fluorescence cross-correlation spectroscopy FCCS and similar methods.
This MATLAB interface provides an intuitive and simple access to the USB2.0 correlator hardware. It features automatic storage of the sample data, live control of the correlator hardware as well as live preview of the intensity trace, correlation curves (background corrected) and photon statistics.
Unpack the archive in a folder of your choice. Install the Flex02-xxD/C driver by Correlator.com. Copy the SDK library "Flex02-xxDC.dll" into the private folder, start MATLAB and call "flex02.m".
The graphical user interface provides live control of the correlator and previews the results during acquisition. You can set-up the correlation mode (up to four auto- and/or cross-correlations) and the integration time.
Clicking on the "File name template" button defines a folder and a file name further used as template for saving the aquired data automatically. A 3-digit file number is prepended and increased on every save. If auto-save is turned on, the raw photon traces can be recorded too.
Controls the display of the intensity traces. Either channel A or B can be hidden, or both can be cleared for resetting the axes limits to span only the current count rates.
Count rates of channel A (in blue) and B (in red) for the most recent 30 seconds. The statusbar shows the elapsed integration time and the most recent count rates.
Correlation amplitudes G versus lag time t. In dual mode, the auto-correlation A×A or the cross-correlation A×B are drawn in blue and the auto-correlation B×B or the cross-correlation B×A are drawn in red, respectively. In quad mode, A×A is drawn in blue, B×B in red, A×B in black and B×A in green, respectively.
To zoom in/out, select the desired range with a mouse drag. A double-click restores the default axes limits.
Selects the number of correlations. In single mode, either the auto-correlation A×A or the cross-correlation A×B is calculated with high resolution. In dual mode, either the auto-correlations A×A and B×B or the cross-correlations A×B and B×A are calculated. In quad mode, the auto-correlations A×A and B×B and the cross-correlations A×B and B×A are simultaneously calculated with low resolution.
In quad mode, controls wheter the cross-correlations A×B and B×A are both displayed or averaged. In single and dual mode, switches between auto- or cross-correlation instead.
Enables recording the photon counts every microsecond during a measurement. Requests the automatic file name generation (auto-save) to be turned on because the photon traces are directly written to a file.
Sets the integration time during continous operation and during a measurement. In case of a measurement, the correlator is stopped and the aquired data is stored to a file once the requested time interval is elapsed. In continous operation, the correlator is periodically restarted instead.
Controls the bin time for the photon counting histogram(s) and the format of the recorded photon trace.
Automatic file name generation and auto-save. If activated, the measurement data is automatically stored to a file within the selected folder and with a file name composed of the three-digit running number, the defined file name template and ".mat" extension. In addition, the running number is increased. In this example, the next file name would be "002 2-color sample.mat".
Measures the static background and enables correction of the live preview of the intensity traces and the correlation curves.
Activates the continous operation of the correlator. The correlator is periodically restarted until the continous operation is turned off.
Starts a measurement of the correlation curves, the intensity traces, the photon counting histograms and records the raw photon traces. If auto-save is deactivated, a file name will be requested.
Update the comments and measurement notes in the last saved file.
Figure 1: Graphical user interface to the Flex02-xxD/C correlator. The intensity traces can be cleared or hidden with a context menu. The correlation axes and the photon counting histograms can be zoomed in.
The aquired data is saved as a MAT-file with file name extension ".mat". Using the script allows to change the file format by modifying the private "export.m" function.
The raw photon traces are saved in a binary file with file name extension ".trace". Each byte represents the number of photons per microsecond counted in channel A or B. In case of a single auto-correlation, only channel A is stored. In all other correlation modes, both channels are stored as interleaved traces. Starting with channel A, every second byte belongs to channel A or B, respectively.
The static background can be measured a priori with a blank (non-fluorescent) sample for subsequent correction of the live preview. The correlation curves approximate then the fluctuation statistics of the fluorescent signal without background. In the MAT-file, the background is saved as separate variable without altering other data.
The graphical interface can be tested without the correlator hardware. For this purpose, use the script version and rename/remove the MEX-function "flex02d0x.dll". The M-function "flex02d0x.m" provides then an emulation of the hardware correlator.
The MATLAB interface to the Flex02-xxD/C USB hardware correlator is published as freeware. The author reserves the right to modify any of the contained files.
You are allowed to distribute this package as long as you deliver the entire, original package for free.
You are allowed to distribute modified versions of export.m and shutter.m as an extension package. In particular, you are not allowed to distribute a combination of modified files with other parts of the original package as a single archive.
Path | File | Description | ||
---|---|---|---|---|
/ | flex02.m | MATLAB interface | ||
Readme.txt | Summary | |||
private/ | export.m | Save the correlation data to a file | ||
flex02d0x.dll | MATLAB interface library | |||
flex02d0x.m | MATLAB interface help and hardware emulation | |||
shutter.m | Automatic shutter control |
Any warranty is strictly refused. Don't rely on any financial or technical support in case of malfunction or damage.
Comments are welcome. I will try to track reported problems and fix bugs.
Initial release of Flex02-08D/C interface.
Bug fix: substituted CPUTIME by NOW for compatibility with MATLAB 7.x.
Initial release of Flex02-01D/C interface.
Bug fix: file name template specification now compatible with MATLAB 7.x.
Magnitude of intensity traces in Flex02-01D/C interface fixed.
Correlation lengths fixed to match the current SDK conventions. In quad-mode the correlation length seems to be 288 instead of 304 as documented. If you get spikes or unexpected correlation results, please report.
Minor bug fixes and update of the user interfaces. Histogram options and comment box added.
Fixed two compatibility issues with MATLAB 2009+.
Downloading these files, you accept the copyright terms.
MATLAB is a registered trademark of The MathWorks, Inc. Windows is a trademark of Microsoft Corp. Other product or brand names are trademarks or registered trademarks of their respective holders.
© 2011 École Polytechnique Fédérale de Lausanne