mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 12:27:14 +02:00
WIP
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
from functools import partial
|
||||
from collections.abc import Iterable
|
||||
class Temperature:
|
||||
degree_sign = u"\N{DEGREE SIGN}"
|
||||
|
||||
def __init__(self, name, enum, detector):
|
||||
self.name = name
|
||||
self.enum = enum
|
||||
@ -19,16 +21,9 @@ class Temperature:
|
||||
|
||||
def __repr__(self):
|
||||
"""String representation for a single temperature in all modules"""
|
||||
degree_sign = u"\N{DEGREE SIGN}"
|
||||
# r_str = ["{:14s}: ".format(self.name)]
|
||||
# r_str += [
|
||||
# "{:6.2f}{:s}C, ".format(self.get(i) / 1000, degree_sign)
|
||||
# for i in range(self.get_nmod())
|
||||
# ]
|
||||
tempstr = ''.join([f'{item:5d}{degree_sign}C' for item in self.get()])
|
||||
|
||||
tempstr = ''.join([f'{item:5d}{self.degree_sign}C' for item in self.get()])
|
||||
return f'{self.name:15s}:{tempstr}'
|
||||
# return "".join(r_str).strip(", ")
|
||||
|
||||
|
||||
class DetectorTemperature:
|
||||
"""
|
||||
@ -43,7 +38,5 @@ class DetectorTemperature:
|
||||
"""String representation of all temps all mods"""
|
||||
r_str = '\n'.join([repr(temp) for temp in self])
|
||||
return r_str
|
||||
# dacstr = ''.join([f'{item:5d}' for item in self.get()])
|
||||
# return f'{self.__name__:10s}:{dacstr}'
|
||||
# return "\n".join([str(t) for t in self])
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user