[SciPy-user] NewBie: Fit Data to an implicit function

Darren Dale dd55 at cornell.edu
Wed Jun 8 08:10:05 CDT 2005

On Wednesday 08 June 2005 9:02 am, Niklas Papathanasiou wrote:
> Hi!
> I like to fit data to an implicit function.
> I(U)=I0*exp((U-I*Rs)/(A*k*T)-1)+(U-IRs)/Rp
> I,U are data
> I0,Rs,Rp,A are Parameter
> k,T are physical constants
> Did anyone did this before or do I have to start from the scratch?

Check the SciPy users guide, about least squares fits. You want to write a 
function that returns the residuals:

residuals = I-I0*exp((U-I*Rs)/(A*k*T)-1)+(U-IRs)/Rp

and then pass that function to scipy.optimize.leastsq

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.scipy.net/pipermail/scipy-user/attachments/20050608/eba1efce/attachment.bin

More information about the SciPy-user mailing list