Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Instructions for submitting batch jobs to run in parallel are here: Batch System Analysis Jobs

Analyzing Scans

To get a list of the scan variables, use the following command:

Code Block
(ps-4.13.42) psanagpu104psanagpu102:lcls2$ detnames -s exp=rixdaq18rixx43518,run=17=45,dir=/cds/data/psdm/prj/public01/xtc
--------------------------
Name           | Data Type
--------------------------
motor1         | raw      
motor2         | raw      
step_value     | raw      
step_docstring | raw      
--------------------------
(ps-4.13.42) psanagpu104psanagpu102:lcls2$   

Note that "step_value"/"step_docstring" are convenience values defined by the DAQ to be a single value/string that is supposed to represent what has happened on a step, for use in plots/printout, since it's not easy to plot, for example, vs. multiple motor positions in a complex scan.

Code similar to this can be used to access the above scan variables:

Code Block
from psana import DataSource
Code Block
from psana import DataSource
ds = DataSource(exp='rixdaq18rixx43518',run=1745,dir='/cds/data/psdm/prj/public01/xtc')
myrun = next(ds.runs())
motor1 = myrun.Detector('motor1')
motor2 = myrun.Detector('motor2')
step_value = myrun.Detector('step_value')
step_docstring = myrun.Detector('step_docstring')
for step in myrun.steps():
    print(motor1(step),motor2(step),step_value(step),step_docstring(step))
    for evt in step.events():
        pass

...