Update fit2.py
fit needs at least 3 points to work properly, this should not fail again in case of extremely slim peaks
This commit is contained in:
parent
e5e824eb4c
commit
52571a1aca
@ -158,7 +158,7 @@ def fitccl(
|
|||||||
numfit_max = gauss_3sigmamax if numfit_max is None else find_nearest(x, numfit_max)
|
numfit_max = gauss_3sigmamax if numfit_max is None else find_nearest(x, numfit_max)
|
||||||
|
|
||||||
it = -1
|
it = -1
|
||||||
while numfit_max == numfit_min:
|
while abs(numfit_max - numfit_min) < 3:
|
||||||
# in the case the peak is very thin and numerical integration would be on zero omega difference, finds closes values
|
# in the case the peak is very thin and numerical integration would be on zero omega difference, finds closes values
|
||||||
it = it + 1
|
it = it + 1
|
||||||
numfit_min = find_nearest(
|
numfit_min = find_nearest(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user