Hey everybody(adsbygoogle = window.adsbygoogle || []).push({});

I've got a question for the programming savvy. I'm generating data which can generally be described by..

f(x,y) = Ʃ_{n}(a_{n}* x^{n})*Ʃ_{n}(b_{n}* y^{n})

Basically what I'm looking at is a data set which shows a surface which looks like about 1/4th of a wonky bowl.

My trouble is that I need to calculate derivatives of f wRT x&y, and do some mathematical magic. To do that, I need to first generate f(x,y) from my raw data. So far, I've always used a canned package like Mathematica or matlab to generate that function, but this time I've got to build it from scratch. (Those licenses are expensive!)

Does anyone have any good examples of a fitting routine worked out for a 2d surface? I'm working in python, and am relatively new to no training wheels scientific computing.

Thanks!

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Data analysis: 2D Surface fitting from raw data

**Physics Forums | Science Articles, Homework Help, Discussion**