seop: fix fitparam command

Change-Id: I75589f4c9d954ebb189bd9c785e9f307767fa69d
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/31273
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-06-02 09:44:24 +02:00
parent 4a80b4e45d
commit a11b8cf2d1

View File

@ -30,7 +30,7 @@ from he3d import he3cell # pylint: disable=import-error
from frappy.core import Attached
from frappy.datatypes import ArrayOf, FloatRange, IntRange, StatusType, \
StringType, StructOf, TupleOf
StringType, TupleOf
from frappy.errors import CommandRunningError
from frappy.modules import Command, Drivable, Module, Parameter, Property, \
Readable
@ -226,8 +226,9 @@ class FitParam(Readable):
self.sigma = ret['sigma']
# Commands
@Command(integral, result=StructOf(xval=ArrayOf(string),
yval=ArrayOf(string)))
@Command(integral, result=TupleOf(ArrayOf(string),
ArrayOf(floating)))
def nmr_paramlog_get(self, n):
"""returns the log of the last 'n' values for this parameter"""
return self.cell.cell.nmr_paramlog_get(self.param, n)
val = self.cell.cell.nmr_paramlog_get(self.param, n)
return ([str(timestamp) for timestamp in val['xval']], val['yval'])