Page History
...
If you want to draw the whole CsPad image, there's currently no pyana function that does this. Pyana only supplies the pixels in a numpy array, and the
exact location of each pixel depends on the conditions at the time of data collection. A simplified way of making the image can be seen in cspad_simple.py
Epics Process Variables
...
and ControlConfig
EPICS data is different from DAQ event data. It stores the conditions and settings of the instruments, but values typically change more slowly than your
average shot-by-shot data, and EPICS data is typically updated only when it changes, or every second, or similar. It is not stored in the 'evt' (event) object,
but in the 'env' (environment) object. You typically would read it only at the beginning of each job or if your doing a scan, you'd read it in every calibration cycle:
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
def begincalibcycle(self,evt,env):
## The returned value should be of the type epics.EpicsPvTime.
pv = env.epicsStore().value( pv_name )
if not pv:
logging.warning('EPICS PV %s does not exist', pv_name)
else:
value = pv.value
status = pv.status
alarm_severity = pv.severity
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
def begincalibcycle(self,evt,env):
ctrl_config = env.getConfig(xtc.TypeId.Type.Id_ControlConfig)
nControls = ctrl_config.npvControls()
for ic in range (0, nControls ):
cpv = ctrl_config.pvControl(ic)
name = cpv.name()
value = cpv.value()
|