Overloads calculate_good_iovs
Definition at line 11 of file magnets.py.
◆ magnet_iov_generator()
def python.subdetectors.magnets.Magnet_Currents.magnet_iov_generator |
( |
|
self, |
|
|
|
iovs, |
|
|
|
system, |
|
|
|
measured_channel, |
|
|
|
desired_channel, |
|
|
|
tolerance |
|
) |
| |
Definition at line 22 of file magnets.py.
22 def magnet_iov_generator(self, iovs, system,
23 measured_channel, desired_channel, tolerance):
25 measured_iovs = iovs.select_channels(measured_channel)
26 desired_iovs = iovs.select_channels(desired_channel)
30 for since, until, (measured, desired)
in events:
38 if measured
is not None:
40 if measured.value
is None:
42 elif measured.value <= tolerance:
44 defect = system +
'_OFF'
54 elif ((system ==
'GLOBAL_SOLENOID' and abs(measured.value - 7730.) < tolerance)
55 or (system ==
'GLOBAL_TOROID' and abs(measured.value - 20400.) < tolerance)):
60 defect = system +
'_RAMPING'
65 mcurrent =
'%.1f' % measured.value
if measured.value
is not None else 'None'
66 scurrent =
'%.1f' % desired.value
if desired.value
is not None else 'None'
67 yield DefectIOV(since, until, defect,
True,
68 comment=
'Measured current: %s, Set current: %s' % (mcurrent, scurrent))
◆ make_good_iovs()
def python.subdetectors.magnets.Magnet_Currents.make_good_iovs |
( |
|
self, |
|
|
|
iovs |
|
) |
| |
Definition at line 15 of file magnets.py.
15 def make_good_iovs(self, iovs):
16 atlsol_iovs = self.magnet_iov_generator(iovs,
'GLOBAL_SOLENOID', 1, 2,
18 atltor_iovs = self.magnet_iov_generator(iovs,
'GLOBAL_TOROID', 3, 4,
20 return IOVSet(
list(atlsol_iovs) +
list(atltor_iovs))
The documentation for this class was generated from the following file: