jhtilgner
01-11-2010, 01:11 PM
I have to solve fitting the derivative of the lorentz distribution.
In funcsG the derivative of lorentz distribution is notated as
H := a[k+0];
P := a[k+1];
B := a[k+2];
PmI := P-I;
Hh2 := sqr( H );
Ph2 := sqr( P );
Bh2 := sqr( B );
PmIh2 := sqr( PmI );
MyV := Bh2 + PmIh2;
y := y + 2 * Bh2 * H * PmI / sqr( MyV );
dyda[k+0] := 2 * Bh2 * PmI / sqr( MyV );
dyda[k+1] := 2 * Bh2 * H * ( Bh2 - 3 * PmIh2 ) / ( sqr(MyV) * MyV );
dyda[k+2] := 4 * B * H * ( ( PmIh2 - Bh2 ) * PmI ) / ( sqr(MyV) * MyV );
But there is no fitting. The default values for peakintensity, position and width are returned. The values of input data are
positive and negative too.
Why?
In funcsG the derivative of lorentz distribution is notated as
H := a[k+0];
P := a[k+1];
B := a[k+2];
PmI := P-I;
Hh2 := sqr( H );
Ph2 := sqr( P );
Bh2 := sqr( B );
PmIh2 := sqr( PmI );
MyV := Bh2 + PmIh2;
y := y + 2 * Bh2 * H * PmI / sqr( MyV );
dyda[k+0] := 2 * Bh2 * PmI / sqr( MyV );
dyda[k+1] := 2 * Bh2 * H * ( Bh2 - 3 * PmIh2 ) / ( sqr(MyV) * MyV );
dyda[k+2] := 4 * B * H * ( ( PmIh2 - Bh2 ) * PmI ) / ( sqr(MyV) * MyV );
But there is no fitting. The default values for peakintensity, position and width are returned. The values of input data are
positive and negative too.
Why?