4 Lucid's criteria are that:
6 1) all non-excluded modules are good.
7 2) The magnet calculator does not report that it is ramping
10 from DQUtils
import process_iovs
11 from DQUtils.sugar
import IOVSet
13 from DCSCalculator2.lib
import DCSC_Subdetector_DefectsOnly, DCSC_Defect_Global_Variable
14 from DCSCalculator2.variable
import DefectIOV
16 from DCSCalculator2.subdetectors.magnets
import Magnets
26 result = magnets.run(lbtime)
27 by_defect = result.by_channel
29 toroid_ramp = by_defect.get(
"GLOBAL_TOROID_RAMPING", IOVSet())
30 solenoid_ramp = by_defect.get(
"GLOBAL_SOLENOID_RAMPING", IOVSet())
36 for since, until, (toroid, solenoid)
in events:
37 if toroid
or solenoid:
38 result.add(since, until,
"LCD_MAGNETS_RAMPING",
True,
"")
40 self.
iovs = result.solidify(DefectIOV)
46 Require that /LUCID/DCS/(LV|HV) has powerStatus == True for all modules
47 which are not in the excluded_channels set
50 def __init__(self, folder_name, defect_name, excluded_channels=None):
51 super(Lucid_Voltage, self).
__init__(folder_name,
None)
60 iovs = iovs.empty(i
for i
in iovs
61 if i.channel
not in excluded_channels)
63 chans, iovsets = iovs.chans_iovsets
67 if not all(s
and s.powerStatus
for s
in states):
68 result.add(since, until, self.
defect_name,
True,
"")
70 return result.solidify(DefectIOV)
72 class Lucid(DCSC_Subdetector_DefectsOnly):
73 folder_base =
'/LUCID/DCS'