Page History
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
import psana class mymod(object): def __init__(self): self.threshold = self.configInt('threshold',176000000) srcStrself.source = self.configStrconfigSrc('source','DetInfo(CxiDs1.0:Cspad.0)') self.source = psana.Source(srcStr) def event(self, evt, env): image = evt.get(psana.ndarray_int16_2, self.source, 'image') if image is None: return photonCount = image[:].sum() if photonCount < self.threshold: self.skip() |
...
Overview
Content Tools