Update fit2.py

This commit is contained in:
JakHolzer 2020-09-22 08:47:31 +02:00 committed by GitHub
parent 5515db234b
commit 8d397a819b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ def fitccl(
x = list(meas["om"])
y = list(meas["Counts"])
# if the dictionaries were merged/substracted, takes the errors from them, if not, takes them as sqrt(y)
y_err = np.sqrt(y) if meas.get("sigma", None) is None else meas[keys].get("sigma")
y_err = np.sqrt(y) if meas.get("sigma", None) is None else meas.get("sigma")
if len(meas["peak_indexes"]) == 0:
# Case for no peak, gaussian in centre, sigma as 20% of range