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 <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
This commit is contained in:
Alexander Zaft 2023-08-23 08:51:09 +02:00 committed by Markus Zolliker
parent 2cdf1fc58e
commit 183709b7ce

View File

@ -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 <count> 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 <count> phase datapoints."""
val = self.cell.cell.nmr_paramlog_get('phase', count)
return ([str(timestamp) for timestamp in val['xval']], val['yval'])