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:
parent
2cdf1fc58e
commit
183709b7ce
@ -194,19 +194,19 @@ class Nmr(Readable):
|
|||||||
x = val['xval'][:len(val['yval'])]
|
x = val['xval'][:len(val['yval'])]
|
||||||
return (x, 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)))
|
ArrayOf(floating, maxlen=100)))
|
||||||
def get_amplitude(self):
|
def get_amplitude(self, count):
|
||||||
"""Last 20 amplitude datapoints."""
|
"""Last <count> amplitude datapoints."""
|
||||||
rv = self.cell.cell.nmr_paramlog_get('amplitude', 20)
|
rv = self.cell.cell.nmr_paramlog_get('amplitude', count)
|
||||||
x = [ str(timestamp) for timestamp in rv['xval']]
|
x = [ str(timestamp) for timestamp in rv['xval']]
|
||||||
return (x,rv['yval'])
|
return (x,rv['yval'])
|
||||||
|
|
||||||
@Command(result=TupleOf(ArrayOf(string, maxlen=100),
|
@Command(IntRange(1), result=TupleOf(ArrayOf(string, maxlen=100),
|
||||||
ArrayOf(floating, maxlen=100)))
|
ArrayOf(floating, maxlen=100)))
|
||||||
def get_phase(self):
|
def get_phase(self, count):
|
||||||
"""Last 20 phase datapoints."""
|
"""Last <count> phase datapoints."""
|
||||||
val = self.cell.cell.nmr_paramlog_get('phase', 20)
|
val = self.cell.cell.nmr_paramlog_get('phase', count)
|
||||||
return ([str(timestamp) for timestamp in val['xval']], val['yval'])
|
return ([str(timestamp) for timestamp in val['xval']], val['yval'])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user