Page History
...
Code Block | ||
---|---|---|
| ||
ssh psana source /cdssdf/group/swlcls/ds/ana/sw/conda2/manage/bin/psconda.sh |
...
Code Block | ||
---|---|---|
| ||
ami-local -b 1 -f interval=1 psana://exp=tmoc00118,run=222,dir=/cdssdf/data/psdmlcls/ds/prj/public01/xtc/ |
- When the AMI window comes up in the "search sources" box on the top left type "opal". That will select only detectors that have the string "opal" in them
- drag the text "tmo_atmopal:raw:image" into the rightmost part of the ami window, a red box will appear
- click on the red box. a Pyqtgraph window should appear with the image, which will update at 1Hz. The plot has many user-settable attributes. You can try clicking the "wrench" icon in the upper left and removing the Auto-Range and Auto-Levels settings (followed by "Apply"): this will give you more control of the color scale using the horizontal yellow control bars on the right.
...
Code Block | ||
---|---|---|
| ||
ami-local -b 100 -f interval=0.002 -l /reg/g/psdm/tutorials/ami2/neh2.2/epixroi_meanvscan.fc psana://exp=rixx45619,run=122,dir=/cdssdf/data/psdmlcls/ds/prj/public01/xtc// |
Image reconstruction using geometry
...
Code Block |
---|
ami-local -f repeat=true -f interval=0.1 -f init=1 -l /reg/g/psdm/tutorials/ami2/tmo/blobfinder.fc psana://exp=tmoc00518,run=1,dir=/cdssdf/data/lcls/psdmds/prj/public01/xtc// |
HitFinder example
Code Block |
---|
ami-local -l /reg/g/psdm/tutorials/ami2/tmo/hitfinder.fc |
...
Code Block |
---|
ami-local -l /reg/g/psdm/tutorials/ami2/neh2.2/rix_flyscan.fc psana://exp=rixx43518,run=34,dir=/cdssdf/data/lcls/psdmds/prj/public01/xtc/ |
Waveform Sideband Subtraction
...
Code Block |
---|
ami-local -b 1 -f interval=1 -l /reg/g/psdm/tutorials/ami2/neh2.2/rix_bkgdsub.fc psana://exp=rixx43518,run=34,dir=/cdssdf/data/psdmlcls/ds/prj/public01/xtc/ |
Step-Scan With Gaussian Fit
...
Code Block |
---|
ami-local -b 1 -f interval=0.3 -l /reg/g/psdm/tutorials/ami2/neh2.2/rix_width_scan.fc psana://exp=rixx43518,run=45,dir=/cdssdf/data/psdmlcls/ds/prj/public01/xtc/ |
Photon Finding and Check of Linearity
...
Dan Damiani has been adding support for LCLS1 data in ami2. The "-b 0" option sets the heartbeat period to 0 ms and currently (3 May 2024) is required for operation.
It's still a work in progress but this It's still a work in progress but this example demonstrates this functionality:
Code Block |
---|
# S3DF
source /sdf/group/lcls/ds/ana/sw/conda1/rel/ami_current/setup_env_lcls1.sh
# old psana system
source /cds/group/pcds/dist/pds/ami2-devel/setup_env_lcls1.sh
ami-local psana://exp=mecly4720,run=30,repeat=true -b 0 |
XPP Example
Code Block |
---|
ami-local hdf5:///reg/g/psdm/tutorials/ami2/xpp/xpp.json |
...
Code Block |
---|
ami-local -l /reg/g/psdm/tutorials/ami2/random/ref_waveform.fc -b 1 -f interval=1 psana://exp=tmoc00118,run=222,dir=/cdssdf/data/lcls/psdmds/prj/public01/xtc/ |
Running Multiple Independent Graphs
...
At high rates ami2 creates “batches” of events for processing (more efficient) but this gets sluggish when running low-rate experiments (e.g. 1Hz) because ami waits for the batch to end (defined by the heartbeat interval) before forwarding the batch through the pipeline. To address this issue Dan Damiani has added the ability to put ami in a “prompt” mode which effectively sets the batch size to 1. It is set on the ami collector process with the "-d=1" flag (depth of heartbeat event-builder buffer). This flag will cause ami to be more responsive at low rates, but function less efficiently at high rates.
Event Filtering in AMI
Often an analysis wants to treat events differently based upon something in the data. A common example is the presence of an eventcode, which may indicate the firing of a pump laser or some other condition. If the The selection logic is can be put into a PythonEditor box, then the editor box should return python's None object to indicate the event flow is to be terminated here; returning a value (even 0) causes the flow to continue with that value and possibly weighting your statistics in unexpected waysyields unexpected/incorrect results. An example flowchart and with a PythonEditor box doing eventcode filtering is shown below. Other boxes can also handle filtering with their "conditional" attributes. This particular example "ping pongs" an image output between two displays depending on whether an eventcode is present or not.
This example should be run like this:
Code Block |
---|
ami-local -b 1 -f interval=1 -l /sdf/group/lcls/ds/ana/tutorials/ami2/eventcode_filter.fc psana://exp=tmoc00118,run=222,dir=/sdf/data/lcls/ds/prj/public01/xtc/ |
The code inside the Python editor box that performs user-specified logic based on the eventcodes is:
Code Block | ||
---|---|---|
| ||
class EventProcessor():
def __init__(self):
pass
def begin_run(self):
pass
def end_run(self):
pass
def begin_step(self, step):
pass
def end_step(self, step):
pass
def on_event(self, image, codes, *args, **kwargs):
# an eventcode that alternates for this data
if codes[14]:
return (image, None)
else:
return (None, image) |
Configuring Plots
Many features of plots can be controlled from the "wrench" icon in the upper-left of AMI plots. This menu allows you to do things like:
...