ultrasound: change control roi0 to a Readable (2)

+ remove cfg/PEUS.py
+ fix equipment_id of PEUS
+ add header to frappy_psi.iqplot
This commit is contained in:
Ultrasound PC 2025-03-26 16:45:53 +01:00
parent 1325c8924d
commit d9f340dce6
2 changed files with 23 additions and 12 deletions

View File

@ -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 <markus.zolliker@psi.ch>
#
# *****************************************************************************
"""support for ultrasound plot clients"""
import numpy as np
import matplotlib.pyplot as plt

View File

@ -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'