Fitting multiple peak with a complex Lorentian type fitting function

I am not so much familiar with fitting in Igor.

I need to to fit a certain spectra (intensity(K) vs Freq(w)) with a complex fitting function (Lorentian type)
K = K0 + A/(p-w+iD)

where complex number i=sqrt(-1)
K0 = numeric background ..usually 0 or interger (need to be found by fitting...mostly = 0)
A = Amplitude (need to be fitted… also can be supplied close value from spectra)
P= peak position (exact value need to be found by fitting..say a peak around 1640 nm)
w = center Frequency of the light used (close value can be supplied from spectra..say 1600 nm etc)
D = damping coefficient (need to be fitted)

There can be many peaks (say 4) in a single K vs w graph where each of which has certain (K,w,A,p,D) value set

I like to write a function that I can call from or a
so that after fitting I can get the values of (p,A,D) for each peak set in a table.

Can anybody give me some initial idea how to proceed.
sorry ...u are right..I made a mistake ...The spectrum ( graph) is Intenisty (I) vs Freq(w) which is of course real ..and Intensity I is proportional to square of the modulus of K.. which is real number...as

 K = K0 + A/(p-w+iD) =K0 +  A(p-w-iD) /(p-w+iD)(p-w-iD) ={ K0 + A(p-w)/((p-w)^2+D^2)} - i{AD/(p-w)^2+D^2}  ..so
  I =( mod K )^2 = {K0+ A(p-w)/((p-w)^2+D^2)}^2 + {AD/((p-w)^2+D^2) }^2
     


How can I fit the spectrum with such function ?
The first step is to write your function as a user-defined fitting function. To read about that, execute this command on Igor's command line:

DisplayHelpTopic "Fitting to a User-Defined Function"

To fit multiple peaks, you have two choices:

Write a version of the fit function that sums up multiple peaks, using the function you wrote.

Write the necessary functions to use your function with Multipeak Fit. To read about that:

DisplayHelpTopic "Adding Your Own Peak Function"

Writing your own peak shape for Multipeak Fit is challenging, but it can be done.

Is there a name for this peak shape?

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com