From 183709b7ce6b7ef406e3a731ec9fb551b1737933 Mon Sep 17 00:00:00 2001 From: Alexander Zaft Date: Wed, 23 Aug 2023 08:51:09 +0200 Subject: [PATCH] frappy_mlz seop: add count to ampl and phase cmds Change-Id: Id7faca31269bb481ec4010f1e0aec2591f0299d6 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/32030 Tested-by: Jenkins Automated Tests Reviewed-by: Alexander Zaft --- frappy_mlz/seop.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frappy_mlz/seop.py b/frappy_mlz/seop.py index deaf56c..1275d00 100644 --- a/frappy_mlz/seop.py +++ b/frappy_mlz/seop.py @@ -194,19 +194,19 @@ class Nmr(Readable): x = val['xval'][:len(val['yval'])] return (x, val['yval']) - @Command(result=TupleOf(ArrayOf(string, maxlen=100), + @Command(IntRange(1), result=TupleOf(ArrayOf(string, maxlen=100), ArrayOf(floating, maxlen=100))) - def get_amplitude(self): - """Last 20 amplitude datapoints.""" - rv = self.cell.cell.nmr_paramlog_get('amplitude', 20) + def get_amplitude(self, count): + """Last amplitude datapoints.""" + rv = self.cell.cell.nmr_paramlog_get('amplitude', count) x = [ str(timestamp) for timestamp in rv['xval']] return (x,rv['yval']) - @Command(result=TupleOf(ArrayOf(string, maxlen=100), + @Command(IntRange(1), result=TupleOf(ArrayOf(string, maxlen=100), ArrayOf(floating, maxlen=100))) - def get_phase(self): - """Last 20 phase datapoints.""" - val = self.cell.cell.nmr_paramlog_get('phase', 20) + def get_phase(self, count): + """Last phase datapoints.""" + val = self.cell.cell.nmr_paramlog_get('phase', count) return ([str(timestamp) for timestamp in val['xval']], val['yval'])