How do I fit this curve with a polynomial function?

Hi all

I'd like to fit the attached curve with a polynomial function.

It's a bit awkward with the hump at around 0.1 in the x-axis. But the idea is to carry out a best auto fit of a polynomial to that curve, and then subtract the data of the polynomial fit by the data of the curve, so that all I left with is the data of the hump which is what actually contains the information I want.

Does anyone know how to do an auto fitting for this?

Regards,
This looks like some SANS or SAXS data to me. If so, you really need to understand the physical meaning behind the fitting routine you will use (as with all data fitting really). There are a number of packages in Igor for small-angle scattering data. Try the NCNR SANS package:
http://www.ncnr.nist.gov/programs/sans/data/data_anal.html

Or Irena:
http://usaxs.xor.aps.anl.gov/staff/ilavsky/irena.html

Hope there's something useful in there.
Hi Igor_user, I noticed that you have been discussing SAS fitting in other forums so that last post was probably not much help!

I would have a go with the CurveFit opertation, for information execute DisplayHelpTopic "Curve Fitting" from the command line. To start with you could try using the curve fit dialogue by selecting Analysis > Curve Fitting. Here you will probably have to play around for a while to get a feel for the coefficients before implementing in a procedure. Using the poly n keyword you can fit a polynomial with n terms to your curve. Using the /K flag you can specify fixed values for the coefficients or /C=constraintSpec flag you can specify constraints for the coefficients if you want them to be limited to a certain range. Execute DisplayHelpTopic "Fitting with Constraints" from the command line to learn more about that. The /M=maskWave flag would probably be very useful, here you can make a mask wave to exclude points i.e. your peak, from the curve fitting for the polynomial. All of these options are available from the dialogue too.

After you have been able to fit a polynomial to the background, if you specify that the fit wave should have the same number of points as the input wave you can subtract the polynomial background from the data then fit the peak. All of this can be automated but you would obviously want to have breaks for the user to specify that they are happy with each part of the fit.
Thanks Thomas and John

I manually removed the hump and smooth the data to make it more like a polynomial curve.

I didn't apply any constraint. I put 'none' for that option and gave some initial values for the coefficients e.g.

K_0=105
K_1=-20
K2=-10

But it returns a message (attached). In this case, can Igor actually do a best square fit to adjust the parameters values?

Regards,
untitled_1.JPG (65.07 KB) untitled_1.JPG (65.07 KB) untitled_1.JPG (65.07 KB)