Maximum-likelihood fitting

Hi

I am using Igor to treat microscopy data of small objects.
Due to the optics I have to fit a 2D gauss to these small objects - which I do without problems.
So far - so good.

Recently it has been proven that both weigthed and unweigthed least square fitting is not optimal, but one should use maximum-likelihood fitting. [1]
( [1]: http://biochem.stanford.edu/PDFs/J.%20Spudich/2010%20Mortensen.pdf )

My problem is: How do I do maximum-likelyhood fitting in Igor?

(I have looked at the build in options and can not seem to find it? Have I overlooked it, or how can I implement it?)

Looking forward to some great ideas or answers.

Best regards,
Emil
We do not directly support maximum likelihood fitting. You can roll your own by writing a function to compute the likelihood function (or more likely, the loglikelihood function). Then you would use the Optimize operation to find the coefficients that maximize the likelihood.

I think that creating a generalized maximum likelihood fitting facility would be difficult and a very large project because of the need to explicitly include distribution information in the calculations. That means that I would have to include many different distributions. A specific implementation for a particular purpose (such as yours) needs only the distribution you actually need.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
I have written an XOP + procedure designed to deal with the kind of data and analysis that you are describing. It is available at http://www.igorexchange.com/project/Localizer. You may want to consider using it before reinventing the wheel.

A few months ago I made a version 2 that is much improved in terms of the user interface, but I haven't uploaded it to IgorExchange yet.

I'm well aware of that reference. It is certainly an interesting and relevant read. However, the situation with the MLE fitting is not as straightforward as it seems. The main complication is that it is only useful if you record the emission intensities in terms of an absolute number of photons. Very few camera systems do this. The overwhelming majority reports the intensities in terms of arbitrary units, and add in preset offsets as well. This means that it is impossible to do MLE unless you are confident that you can convert the signal coming out of the camera to the actual number of photons detected in each pixel.

Due to measurement noise it is difficult to be sure of the conversion, and that has me somewhat sceptical. Because of that, I have continued to stick with Gaussian fitting as my localization algorithm of choice as I find it to be the most robust.

Also, the improvement that you may obtain is likely to be fairly negligible in practice unless your data is of exceptionally high quality.

Note that the Localizer XOP does include an implementation of the algorithm proposed by Mortensen et al, so your needs should be covered. But due to the reasons above I haven't tested it as rigorously as the other algorithms. It is also very important that you understand the issues at play before diving into this.
Thank you very much

Both for the XOP and the recommendation / warnings about implementing the method.

I will look into it the coming weeks, and get back to you if I come up with further questions / suggestions.

Again, thanks a lot for the quick replies.

Best regards,
Emil
741-

That looks like a package that would be useful to quite a few folks who use Igor. We get questions fairly frequently about finding locations of fluorescent spots in images. Can you tell me how generally applicable this package is? Would anyone with a microscope and fluorescent particles be able to use it? Or is specifically for a specialized type of microscopy?

Please excuse my ignorant terminology- in my previous life I was in geophysics...

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
johnweeks wrote:
That looks like a package that would be useful to quite a few folks who use Igor. We get questions fairly frequently about finding locations of fluorescent spots in images. Can you tell me how generally applicable this package is? Would anyone with a microscope and fluorescent particles be able to use it? Or is specifically for a specialized type of microscopy?


Finding fluorescent spots in noisy or nonuniform images is part of its 'core business'. The algorithm that it uses is very good, but it does assume that the spots arise from objects that are homogeneous in size and smaller than the point-spread function (though the latter can be relaxed straightforwardly). If those are satisfied then it can be used with pretty much any microscope and any kind of data. I've heard of people using it for completely different purposes than I originally intended.

In the XOP the segmentation is available in its own operation, "EmitterSegmentation". The download includes reference documentation on how to use it, specifically for others who want to use in their own code.


741 wrote:
I've heard of people using it for completely different purposes than I originally intended.
Sounds like our customers :)
Quote:
In the XOP the segmentation is available in its own operation, "EmitterSegmentation". The download includes reference documentation on how to use it, specifically for others who want to use in their own code.
I will try to remember this the next time I get the question.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com