Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Unverified Commit 08567050 authored by JakHolzer's avatar JakHolzer Committed by GitHub
Browse files

Update ccl_findpeaks.py

Added one more parameter "variable", so we can use the function also for other scans than omega, will be necessary in param study and should not influence the ccl integration hopefully.
parent ce608f1b
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,13 @@ from scipy.signal import savgol_filter
def ccl_findpeaks(
scan, int_threshold=0.8, prominence=50, smooth=False, window_size=7, poly_order=3
scan,
int_threshold=0.8,
prominence=50,
smooth=False,
window_size=7,
poly_order=3,
variable="om",
):
"""function iterates through the dictionary created by load_cclv2 and locates peaks for each scan
......@@ -54,7 +60,7 @@ def ccl_findpeaks(
prominence = 50
print("Invalid value for prominence, select positive number, new value set to:", prominence)
omega = scan["om"]
omega = scan[variable]
counts = np.array(scan["Counts"])
if smooth:
itp = interp1d(omega, counts, kind="linear")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment