@reddish Thanks for your quick reply. I tried using frequencySet(8e6) instead of sampling on the external trigger. The problem is still there.
Great that you mentioned np.concatenate, I will use it.
Interestingly, as I mentioned, the problem is not present the first time after resetting (see figure, yes, some feature in the start immediately after the trigger, but I can accept this). After running the function again (buttom click in pyqt window), I get the smaller amplitude as show. For this reason, I reckon the problem could arise in the scripts... Let me know if you have any other debug ideas!
Thanks