Skip to content
Snippets Groups Projects

AFP DCSCalculator2 - combine tolerable defects

Merged Petr Fiedler requested to merge fiedlerp/athena:23.0-afp-dcsc-combinations into main
All threads resolved!
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -7,7 +7,7 @@ pbeastServer = os.getenv('PBEAST_SERVER', pbeastDefaultServer)
import libpbeastpy; pbeast = libpbeastpy.ServerProxy(pbeastServer)
import logging; log = logging.getLogger("DCSCalculator2.variable")
from itertools import chain
from itertools import chain, combinations
from DQUtils.events import process_iovs
from DQUtils.general import timer
@@ -433,7 +433,7 @@ class AFP(DCSC_DefectTranslate_Subdetector):
if len(matched) < 2: continue # We need at least two defects
matched_diffs = [diff for state,diff in zip(states, channel_diffs) if state.Code == code]
bad_channels = [{iov.channel + diff for iov in state._orig_iovs if iov.good == False} for state,diff in zip(matched,matched_diffs)]
if all(a.issubset(b) for a in bad_channels for b in bad_channels): continue # We need the defects to have different origin
if all(a.issubset(b) or a.issuperset(b) for a,b in combinations(bad_channels, 2)): continue # We need that the defects have different origin
result.append(DefectIOV(since, until, defect_name, True, comment=comment()))
return result
return combinator_core
Loading