FCS - Matlab code

classic Classic list List threaded Threaded
5 messages Options
Alessandro Esposito Alessandro Esposito
Reply | Threaded
Open this post in threaded view
|

FCS - Matlab code

*****
To join, leave or search the confocal microscopy listserv, go to:
http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
*****

Dear all,
    I was trying to write code for FCS analysis in Matlab, but noticed that
computing the ACF directly is computationally very expensive. I've read papers
about the math needed to make the problem computationally efficient, but not
intending to develop new FCS methods I am not that keen committing too much
time into that.

Does anyone have Matlab code for FCS analysis. If you have a toolbox great, if
you have just the optimized functions to compute the correlation functions for
FCS and FCCS, it will be anyway VERY helpful.

Cheers,

Alessandro
www.quantitative-microscopy.org
Mark Cannell Mark Cannell
Reply | Threaded
Open this post in threaded view
|

Re: FCS - Matlab code

*****
To join, leave or search the confocal microscopy listserv, go to:
http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
*****

Have you looked at this? (I found it with google)

http://www.mathworks.com/matlabcentral/fileexchange/22358

Cheers
On 14/06/2011, at 12:27 PM, Alessandro Esposito wrote:

> *****
> To join, leave or search the confocal microscopy listserv, go to:
> http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
> *****
>
> Dear all,
>    I was trying to write code for FCS analysis in Matlab, but noticed that
> computing the ACF directly is computationally very expensive. I've read papers
> about the math needed to make the problem computationally efficient, but not
> intending to develop new FCS methods I am not that keen committing too much
> time into that.
>
> Does anyone have Matlab code for FCS analysis. If you have a toolbox great, if
> you have just the optimized functions to compute the correlation functions for
> FCS and FCCS, it will be anyway VERY helpful.
>
> Cheers,
>
> Alessandro
> www.quantitative-microscopy.org
David Baddeley David Baddeley
Reply | Threaded
Open this post in threaded view
|

Re: FCS - Matlab code

*****
To join, leave or search the confocal microscopy listserv, go to:
http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
*****

It's been a while since I used matlab, but the other classic way to speed up
correlation is to use FFTs  - ie:
corr = ifftshift(real(ifft(fft(x)*fft(flipud(x)))))

you can also replace fft(flipud(x)) with ifft(x) (subject to normalisation),
which will avoid a couple of memory allocations.

this method should be significantly faster (O(nlogn)) than a standard
correlation (O(n^2)), but you might need to mess around a bit with normalisation
and cut out just the bit of the curve corresponding to +ve lags.

I have a funny feeling that this might already be available as a function
(potentially called fftcorr), but can't be sure.

cheers,
David



----- Original Message ----LISTS.UMN.EDU
Sent: Wed, 15 June, 2011 1:08:38 AM
Subject: Re: FCS - Matlab code

*****
To join, leave or search the confocal microscopy listserv, go to:
http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
*****

Have you looked at this? (I found it with google)

http://www.mathworks.com/matlabcentral/fileexchange/22358

Cheers
On 14/06/2011, at 12:27 PM, Alessandro Esposito wrote:

> *****
> To join, leave or search the confocal microscopy listserv, go to:
> http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
> *****
>
> Dear all,
>    I was trying to write code for FCS analysis in Matlab, but noticed that
> computing the ACF directly is computationally very expensive. I've read papers

> about the math needed to make the problem computationally efficient, but not
> intending to develop new FCS methods I am not that keen committing too much
> time into that.
>
> Does anyone have Matlab code for FCS analysis. If you have a toolbox great, if

> you have just the optimized functions to compute the correlation functions for

> FCS and FCCS, it will be anyway VERY helpful.
>
> Cheers,
>
> Alessandro
> www.quantitative-microscopy.org

Sudipta Maiti Sudipta Maiti
Reply | Threaded
Open this post in threaded view
|

Re: FCS - Matlab code

*****
To join, leave or search the confocal microscopy listserv, go to:
http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
*****

One of my students wrote a C program a few years ago which did autocorrelation
(I think using a 'multiple Tau' algorithm), taking data from a digital
counter, and was reasonably fast. If you are interested, please contact me off
the list.
Sudipta
On Tue, 14 Jun 2011 14:40:26 -0700, David Baddeley wrote

> *****
> To join, leave or search the confocal microscopy listserv, go to:
> http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
> *****
>
> It's been a while since I used matlab, but the other classic way to
> speed up correlation is to use FFTs  - ie: corr =
> ifftshift(real(ifft(fft(x)*fft(flipud(x)))))
>
> you can also replace fft(flipud(x)) with ifft(x) (subject to
> normalisation), which will avoid a couple of memory allocations.
>
> this method should be significantly faster (O(nlogn)) than a
> standard correlation (O(n^2)), but you might need to mess around a
> bit with normalisation and cut out just the bit of the curve
> corresponding to +ve lags.
>
> I have a funny feeling that this might already be available as a
> function
> (potentially called fftcorr), but can't be sure.
>
> cheers,
> David
>
> ----- Original Message ----LISTS.UMN.EDU
> Sent: Wed, 15 June, 2011 1:08:38 AM
> Subject: Re: FCS - Matlab code
>
> *****
> To join, leave or search the confocal microscopy listserv, go to:
> http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
> *****
>
> Have you looked at this? (I found it with google)
>
> http://www.mathworks.com/matlabcentral/fileexchange/22358
>
> Cheers
> On 14/06/2011, at 12:27 PM, Alessandro Esposito wrote:
>
> > *****
> > To join, leave or search the confocal microscopy listserv, go to:
> > http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
> > *****
> >
> > Dear all,
> >    I was trying to write code for FCS analysis in Matlab, but noticed that
> > computing the ACF directly is computationally very expensive. I've read
papers
>
> > about the math needed to make the problem computationally efficient, but
not
> > intending to develop new FCS methods I am not that keen committing too
much
> > time into that.
> >
> > Does anyone have Matlab code for FCS analysis. If you have a toolbox
great, if
>
> > you have just the optimized functions to compute the correlation functions
for
>
> > FCS and FCCS, it will be anyway VERY helpful.
> >
> > Cheers,
> >
> > Alessandro
> > www.quantitative-microscopy.org


Dr. Sudipta Maiti
Associate Professor
Dept. of Chemical Sciences
Tata Institute of Fundamental Research
Homi Bhabha Raod, Colaba, Mumbai 400005
Ph. 91-22-2278-2716 / 2539
Fax: 91-22-2280-4610
alternate e-mail: [hidden email]
url: biophotonics.wetpaint.com
Sudipta Maiti Sudipta Maiti
Reply | Threaded
Open this post in threaded view
|

Re: FCS - Matlab code - Hardware options

In reply to this post by David Baddeley
*****
To join, leave or search the confocal microscopy listserv, go to:
http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
*****

Forgot to mention, there are also real-time hardware correlators available
from Correlator.com (no financial interest) for about $2K without drivers. We
have developed a LabView driver for it that does control / display / on line
fitting of the FCS curve to various simple models etc. The driver is available
free from us as a LabView executable (LabView not required on your PC).
We also have a separate Maximum Entropy based FCS fitting routine (MEMFCS) for
continuous distributions (described in Sengupta et al., Biophys. J., vol. 84,
2003, 1977) - again available free.

Sudipta

  On Tue, 14 Jun 2011 14:40:26 -0700, David Baddeley wrote

> *****
> To join, leave or search the confocal microscopy listserv, go to:
> http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
> *****
>
> It's been a while since I used matlab, but the other classic way to
> speed up correlation is to use FFTs  - ie: corr =
> ifftshift(real(ifft(fft(x)*fft(flipud(x)))))
>
> you can also replace fft(flipud(x)) with ifft(x) (subject to
> normalisation), which will avoid a couple of memory allocations.
>
> this method should be significantly faster (O(nlogn)) than a
> standard correlation (O(n^2)), but you might need to mess around a
> bit with normalisation and cut out just the bit of the curve
> corresponding to +ve lags.
>
> I have a funny feeling that this might already be available as a
> function
> (potentially called fftcorr), but can't be sure.
>
> cheers,
> David
>
> ----- Original Message ----LISTS.UMN.EDU
> Sent: Wed, 15 June, 2011 1:08:38 AM
> Subject: Re: FCS - Matlab code
>
> *****
> To join, leave or search the confocal microscopy listserv, go to:
> http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
> *****
>
> Have you looked at this? (I found it with google)
>
> http://www.mathworks.com/matlabcentral/fileexchange/22358
>
> Cheers
> On 14/06/2011, at 12:27 PM, Alessandro Esposito wrote:
>
> > *****
> > To join, leave or search the confocal microscopy listserv, go to:
> > http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
> > *****
> >
> > Dear all,
> >    I was trying to write code for FCS analysis in Matlab, but noticed that
> > computing the ACF directly is computationally very expensive. I've read
papers
>
> > about the math needed to make the problem computationally efficient, but
not
> > intending to develop new FCS methods I am not that keen committing too
much
> > time into that.
> >
> > Does anyone have Matlab code for FCS analysis. If you have a toolbox
great, if
>
> > you have just the optimized functions to compute the correlation functions
for
>
> > FCS and FCCS, it will be anyway VERY helpful.
> >
> > Cheers,
> >
> > Alessandro
> > www.quantitative-microscopy.org


Dr. Sudipta Maiti
Associate Professor
Dept. of Chemical Sciences
Tata Institute of Fundamental Research
Homi Bhabha Raod, Colaba, Mumbai 400005
Ph. 91-22-2278-2716 / 2539
Fax: 91-22-2280-4610
alternate e-mail: [hidden email]
url: biophotonics.wetpaint.com