summaryrefslogtreecommitdiff
path: root/lib/lorentzian.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-10-09 14:12:35 +0200
committerChristoph Berg <myon@debian.org>2026-10-09 14:12:35 +0200
commitffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch)
tree1269efa852935b183daae4bb33a58d1b4d2ffb53 /lib/lorentzian.f90
parent059831534c7e884f0a607ed86b582fd00d821731 (diff)
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
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
-