Multipeak fits with Guass/Lor combo

I'm trying to do a multipeak fit with a guassian/lorentzian function in Igor Pro 6.03A2 with normalized wavelength functions. I wrote my function (which I can't get to work for one fit) f(x)=yo+B+A(e^(-((x-xo)/w)^2)+1/(x-xo). My indie variable is X and fit coefficients are the rest; xo, A, B, w, yo. To estimate my coefficients I did a quick lor fit but it gives me unrealistic values that change drastically with a small shift in end points. I have to specific questions.

1. Any Pointers on what I may doing wrong to get the gauss/lor fit working?
2. Is there a way to get my working fit into the multipeak fit package option?

On a side note. I'm new to Igor so please be explicit.
Thanks!
smason wrote:
I'm trying to do a multipeak fit with a guassian/lorentzian function in Igor Pro 6.03A2 with normalized wavelength functions. I wrote my function (which I can't get to work for one fit)

If it doesn't work for one fit, it won't work for multipeak fitting. Making it work for one fit is the first step in the process.
Quote:
f(x)=yo+B+A(e^(-((x-xo)/w)^2)+1/(x-xo).

This can't be correct. The coefficients y0 and B can't be distinguished. My guess is that this is a typo.
Quote:
My indie variable is X and fit coefficients are the rest; xo, A, B, w, yo. To estimate my coefficients I did a quick lor fit but it gives me unrealistic values that change drastically with a small shift in end points. I have to specific questions.

1. Any Pointers on what I may doing wrong to get the gauss/lor fit working?

This part: (e^(-((x-xo)/w)^2) is a Gaussian, but this part: 1/(x-xo is not a Lorenzian. It's an offset hyperbola.
Quote:
2. Is there a way to get my working fit into the multipeak fit package option?

Yes- there is documentation about what you need to do. It involves writing additional functions that give the Multipeak Fit package information about your fitting function. It can be kind of tricky- you really must get the fit working for individual fits first. Adding a peak function to Multipeak Fit I would say is for an intermediate-level Igor programmer.

I have one other question- the sum of a Gaussian and a Lorenzian seems to be a poor-man's approximation of a Voigt function (convolution of Gaussian and Lorenzian). How about using the Voigt peak shape that is provided by the Multipeak Fit package?

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com