Versions Compared

Key

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

...

For examples that load a predefined graph (.fc file, for "flow chart") you should see a window like this, while examples with no .fc file will have an empty area in the upper right:

Loading Data in AMI

There are three different ways to load data in AMI, either through using the gui, providing a json file, or by passing command line arguments. The different methods are described below.

Loading Data through the GUI

Image Added

The first option is to run ami-local without any flags. Once the main window appears, click the Configure button and the window in the image above will appear. From there hdf5 files or xtc2 files can be loaded by clicking on Add. Only one type of file may be loaded at a time, either hdf5 or xtc2, but multiple files can be loaded. AMI will loop through all the events in each file in the order they are loaded. The different options are explained below.

Note: If a source is configured through the gui configuration window, the source configuration will be saved with the graph and can be automatically reloaded by running ami-local -l <graph.fc>

JSON Configuration File

 

Code Block
 {
    "interval": 0.01,
    "init_time": 0.5,
    "repeat": true,
	"files": ["run22.h5"]
}


Additionally a JSON file containing a source configuration may be provided. A URI to the file where the prefix contains the source type must be passed to AMI. For example to load the above file run ami-local hdf5:///worker.json to use the psana source run ami-local psana:///worker.json. 

Command Line Configuration

Given a psana experiment and run number the xtc2 files can be loaded using the following syntax:

Code Block
ami-local psana://exp=tstx00417:run=82

Configuration Flags

FlagDescription
intervalTime in seconds to sleep between events
init_timeTime in seconds to sleep before emitting the first event
repeatLoop over files/events after reaching end
filesComma separated list of files to load (either xtc2 or hdf5)

These flags can be passed to the source using any of the three methods above, the gui configuration window, a json file, or using the -f command line flag. To specify multiple flags using the command line pass -f multiple times ex: ami-local -f interval=0.1 -f init_time=0.5 -f files=run22.h5,run23.h5 hdf5://

TMO Examples

Example includes:

...