Page History
...
Code Block | ||
---|---|---|
| ||
import psana
from xtcav.ShotToShotCharacterization import *
maxshots=5 #Maximum number of valid shots to process
experiment='amoc8114' #Experiment label
runs='87' #Runs
#Loading the dataset from the "dark" run, this way of working should be compatible with both xtc and hdf5 files
dataSource=psana.DataSource("exp=%s:run=%s:idx" % (experiment,runs))
#XTCAV Retrieval (setting the data source is useful to get information such as experiment name)
XTCAVRetrieval=ShotToShotCharacterization();
XTCAVRetrieval.SetDataSource(dataSource)
for r,run in enumerate(dataSource.runs()):
times = run.times()
for t in times:
evt = run.event(t)
if not XTCAVRetrieval.SetCurrentEvent(evt):
continue
t,power,ok=XTCAVRetrieval.XRayPower()
agreement,ok=XTCAVRetrieval.ReconstructionAgreement() |
...
Overview
Content Tools