diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
| commit | 2d1068e60bce7ae1fff11623454900e8cee956b1 (patch) | |
| tree | acebe276e30466ef0ab91bc3da5e379bec0d7dc5 /lib/fchisq0.f90 | |
| parent | 43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (diff) | |
New upstream version 2.6.0~rc3+repackupstream/2.6.0_rc3+repack
Diffstat (limited to 'lib/fchisq0.f90')
| -rwxr-xr-x | lib/fchisq0.f90 | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/lib/fchisq0.f90 b/lib/fchisq0.f90 index 2c62f275..742df078 100755 --- a/lib/fchisq0.f90 +++ b/lib/fchisq0.f90 @@ -1,23 +1,23 @@ -real function fchisq0(y,npts,a) - - real y(npts),a(4) - -! rewind 51 - chisq = 0. - do i=1,npts - x=i - z=(x-a(3))/(0.5*a(4)) - yfit=a(1) - if(abs(z).lt.3.0) then - d=1.0 + z*z - yfit=a(1) + a(2) * (1.0/d - 0.1) - endif - chisq=chisq + (y(i) - yfit)**2 -! write(51,3001) i,y(i),yfit,y(i)-yfit -!3001 format(i5,3f10.4) - enddo - fchisq0=chisq - - return -end function fchisq0 - +real function fchisq0(y,npts,a)
+
+ real y(npts),a(4)
+
+! rewind 51
+ chisq = 0.
+ do i=1,npts
+ x=i
+ z=(x-a(3))/(0.5*a(4))
+ yfit=a(1)
+ if(abs(z).lt.3.0) then
+ d=1.0 + z*z
+ yfit=a(1) + a(2) * (1.0/d - 0.1)
+ endif
+ chisq=chisq + (y(i) - yfit)**2
+! write(51,3001) i,y(i),yfit,y(i)-yfit
+!3001 format(i5,3f10.4)
+ enddo
+ fchisq0=chisq
+
+ return
+end function fchisq0
+
|
