From a11b8cf2d1bae740488a303552043a9c6bba02e4 Mon Sep 17 00:00:00 2001 From: Alexander Zaft Date: Fri, 2 Jun 2023 09:44:24 +0200 Subject: [PATCH] seop: fix fitparam command Change-Id: I75589f4c9d954ebb189bd9c785e9f307767fa69d Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/31273 Tested-by: Jenkins Automated Tests Reviewed-by: Alexander Zaft --- frappy_mlz/seop.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frappy_mlz/seop.py b/frappy_mlz/seop.py index 6bdbee01..c1938067 100644 --- a/frappy_mlz/seop.py +++ b/frappy_mlz/seop.py @@ -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'])