Page History
...
Code Block | ||
---|---|---|
| ||
#!/usr/bin/env python # these two lines for example purposes only, to allow user to write # calibration information to local directory called "calib". # should be deleted for real analysis. import psana psana.setOption('psana.calib-dir','calib') from xtcav.GenerateDarkBackground import * GDB=GenerateDarkBackground(); GDB.experiment='xpptut15' GDB.runs='102' GDB.maxshots=10 GDB.SetValidityRange(101,125) # delete second run number argument to have the validity range be open-ended ("end") GDB.Generate(); |
...
Code Block | ||
---|---|---|
| ||
#!/usr/bin/env python
# these two lines for example purposes only, to allow user to write
# calibration information to local directory called "calib".
# should be deleted for real analysis.
import psana
psana.setOption('psana.calib-dir','calib')
from xtcav.GenerateLasingOffReference import *
GLOC=GenerateLasingOffReference();
GLOC.experiment='xpptut15'
GLOC.runs='101'
GLOC.maxshots=2
GLOC.nb=2
GLOC.islandsplitmethod = 'scipyLabel' # see confluence documentation for how to set this parameter
GLOC.groupsize=5 # see confluence documentation for how to set this parameter
GLOC.SetValidityRange(101,125) # delete second run number argument to have the validity range be open-ended
("end")
GLOC.Generate(); |
...
Code Block | ||
---|---|---|
| ||
import psana # this line is for example purposes only, to allow user to read # calibration information from local directory called "calib". # should be deleted for real analysis. It also sets a flag # ("allow-corrupt-epics") that allows the example data to be analyzed. psana.setOptions({'psana.calib-dir':'calib', 'psana.allow-corrupt-epics':True}) from xtcav.ShotToShotCharacterization import * experiment='xpptut15' #Experiment label runs='124' #Runs #Loading the dataset from the "dark" run, this way of working should be compatible with both xtc and hdf5 f iles 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.SetEnv(dataSource.env()) for r,run in enumerate(dataSource.runs()): times = run.times() for t in times: evt = run.event(t) if not XTCAVRetrieval.SetCurrentEvent(evt): continue time,power,ok=XTCAVRetrieval.XRayPower() agreement,ok=XTCAVRetrieval.ReconstructionAgreement() |
...
Overview
Content Tools