From 51e79fd166040cfc413a5f68eaa1c8823868c212 Mon Sep 17 00:00:00 2001
From: Laurent Mercadier <laurent.mercadier@xfel.eu>
Date: Fri, 27 Mar 2020 10:38:11 +0100
Subject: [PATCH] source argument can be used to give name of peak Id dimension

---
 xgm.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xgm.py b/xgm.py
index 192508a..7038690 100644
--- a/xgm.py
+++ b/xgm.py
@@ -834,8 +834,8 @@ def fastAdcPeaks(data, channel, intstart, intstop, bkgstart, bkgstop,
                 two bunches @ 4.5 MHz. 
             npulses: number of pulses. If None, takes the maximum number of
                 pulses according to the bunch patter (field 'npulses_sase3')
-            source: str, nature of the pulses: 'sase[1,2 or 3]', or 'scs_ppl',
-                used to give name to the peak Id dimension.
+            source: str, nature of the pulses, 'sase[1,2 or 3]', or 'scs_ppl',
+                or any name. Used to give name to the peak Id dimension.
             usePeakValue: bool, if True takes the peak value of the signal, 
                           otherwise integrates over integration region.
             peakType: str, 'pos' or 'neg'. Used if usePeakValue is True to
@@ -864,7 +864,7 @@ def fastAdcPeaks(data, channel, intstart, intstop, bkgstart, bkgstop,
                 period = 24 * step
             else:
                 period = 1
-    pulseId = 'peakId'
+    pulseId = source
     if source=='scs_ppl':
         pulseId = 'ol_pId'
     if 'sase' in source:
-- 
GitLab