Page History
...
Code Block |
---|
rule for the docstring? "detname_scanname_step" scanname "chargeinj7" means every 7th pixel scanname "chargeinj3" means every 3rd pixel step_value = 0 step_docstring = "epix0_chargeinj_0; epix3_chargeinj_0; epix7_chargeinj_0" step_value = 1 step_docstring = "epix0_chargeinj_1; epix3_chargeinj_1; epix7_chargeinj_1" |
Meta Data Example (ued)
Code Block | ||||
---|---|---|---|---|
| ||||
psexport01$ xtcreader -d -f /cds/data/psdm/ued/ueddaq02/xtc/ueddaq02-r0028-s000-c000.xtc2 | grep step_docstring
Name: 'step_docstring' Type: 10 Rank: 1
1: 'step_docstring' rank 1, type 10
'step_docstring': "{"detname": "epixquad_0", "scantype": "pedestal", "step": 0}"
1: 'step_docstring' rank 1, type 10
'step_docstring': "{"detname": "epixquad_0", "scantype": "pedestal", "step": 1}"
1: 'step_docstring' rank 1, type 10
'step_docstring': "{"detname": "epixquad_0", "scantype": "pedestal", "step": 2}"
1: 'step_docstring' rank 1, type 10
'step_docstring': "{"detname": "epixquad_0", "scantype": "pedestal", "step": 3}"
1: 'step_docstring' rank 1, type 10
'step_docstring': "{"detname": "epixquad_0", "scantype": "pedestal", "step": 4}"
psexport01$ xtcreader -d -f /cds/data/psdm/ued/ueddaq02/xtc/ueddaq02-r0028-s000-c000.xtc2 | grep step_value
Name: 'step_value' Type: 7 Rank: 0
0: 'step_value' rank 0, type 7
'step_value': 0
0: 'step_value' rank 0, type 7
'step_value': 1
0: 'step_value' rank 0, type 7
'step_value': 2
0: 'step_value' rank 0, type 7
'step_value': 3
0: 'step_value' rank 0, type 7
'step_value': 4 |
Psana Step-Store Approach
The idea here is tomake the bluesky scans look the same as det-config scans. Mona’s step-store (from “detnames -s”) contains a list of variables, which in both cases includes step_value, step_docstring ("metadata"). In the case of a bluesky scan it also includes the PV values. In the case of a config scan the configs themselves get updated on each step.
Sample Scan Script
Note that the step_docstring is json as per Mikhail's suggestion above.
Code Block | ||
---|---|---|
| ||
from psana import DataSource import sys # a config scan for epix ds = DataSource(exp='ueddaq02',run=28) myrun = next(ds.runs()) step_value = myrun.Detector('step_value') step_docstring = myrun.Detector('step_docstring') for nstep,step in enumerate(myrun.steps()): print('step:',nstep,step_value(step),step_docstring(step)) for nevt,evt in enumerate(step.events()): if nevt==3: print('evt3:',nstep,step_value(evt),step_docstring(evt)) |
Overview
Content Tools