From d9f340dce683bb79d19be194a0894040da14df18 Mon Sep 17 00:00:00 2001 From: Ultrasound PC Date: Wed, 26 Mar 2025 16:45:53 +0100 Subject: [PATCH] ultrasound: change control roi0 to a Readable (2) + remove cfg/PEUS.py + fix equipment_id of PEUS + add header to frappy_psi.iqplot --- frappy_psi/iqplot.py | 27 ++++++++++++++++++++++----- frappy_psi/ultrasound.py | 8 +------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/frappy_psi/iqplot.py b/frappy_psi/iqplot.py index 5e9baec..1ce4773 100644 --- a/frappy_psi/iqplot.py +++ b/frappy_psi/iqplot.py @@ -1,8 +1,25 @@ -""" -Created on Tue Feb 4 11:07:56 2020 - -@author: tartarotti_d-adm -""" +# ***************************************************************************** +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Module authors: +# Damaris Tartarotti Maimone +# Markus Zolliker +# +# ***************************************************************************** +"""support for ultrasound plot clients""" import numpy as np import matplotlib.pyplot as plt diff --git a/frappy_psi/ultrasound.py b/frappy_psi/ultrasound.py index f13e48e..c7a645a 100644 --- a/frappy_psi/ultrasound.py +++ b/frappy_psi/ultrasound.py @@ -83,10 +83,8 @@ class Roi(Readable): return Done -class ControlRoi(Roi, Writable): +class ControlRoi(Roi, Readable): freq = Attached() - # target is not releavnt -> always moving to I to zero - target = Parameter(datatype=Roi.value.datatype, export=False) maxstep = Parameter('max frequency step', FloatRange(unit='Hz'), readonly=False, default=10000) minstep = Parameter('min frequency step for slope calculation', FloatRange(unit='Hz'), @@ -122,10 +120,6 @@ class ControlRoi(Roi, Writable): elif self.control_active: self._freq_target = self.freq.write_target(clamp(freq - self.maxstep, newfreq, freq + self.maxstep)) - def write_target(self, value): - self.control_active = True - return 0 - class Pars(Module): description = 'relevant parameters from SEA'