summaryrefslogtreecommitdiff
path: root/lib/lorentzian.f90
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lorentzian.f90')
-rw-r--r--lib/lorentzian.f907
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/lorentzian.f90 b/lib/lorentzian.f90
index f3f4e14e..03e081fb 100644
--- a/lib/lorentzian.f90
+++ b/lib/lorentzian.f90
@@ -84,7 +84,11 @@ subroutine lorentzian(y,npts,a)
endif
! Find minimum of parabola defined by last three points
- delta=delta*(1./(1.+(chisq1-chisq2)/(chisq3-chisq2))+0.5)
+ if(chisq3.eq.chisq2) then
+ delta=0.5*delta
+ else
+ delta=delta*(1./(1.+(chisq1-chisq2)/(chisq3-chisq2))+0.5)
+ endif
a(j)=a(j)-delta
deltaa(j)=deltaa(j)*fn/3.
! write(*,4000) iter,j,a,chisq2
@@ -99,4 +103,3 @@ subroutine lorentzian(y,npts,a)
return
end subroutine lorentzian
-