Added a line that in case of not running the peak finder prior to the fit creates empty list of peak positions, ergo it behaves like no peak scenario
This commit is contained in:
JakHolzer 2020-10-30 15:53:25 +01:00 committed by GitHub
parent 468f33e606
commit 7c2ecef56d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,6 +59,8 @@ def fitccl(
constraints_min = [23, None, 50, 0, 0] constraints_min = [23, None, 50, 0, 0]
constraints_min = [80, None, 1000, 0, 100] constraints_min = [80, None, 1000, 0, 100]
""" """
if "peak_indexes" not in scan:
scan["peak_indexes"] = []
if len(scan["peak_indexes"]) > 1: if len(scan["peak_indexes"]) > 1:
# return in case of more than 1 peaks # return in case of more than 1 peaks
print("More than 1 peak, scan skipped") print("More than 1 peak, scan skipped")