Versions Compared

Key

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

...

Code Block
ami-client -H {ami_manager_node} -g "my<my_unique_name_graph"_graph> -p <port_number>

This will bring up the usual ami user-interface window where you can build a graph (or you can load a previously saved graph with the usual "-l" option described above).

Note that the graph name given to the "-g" parameter must be unique (the default for ami is "graph", so don't use that one).  The correct hutch daq environment also has to be setup (e.g. "source /cds/group/pcds/dist/pds/tmo/scripts/setup_env.sh").  The "ami_manager_node" node name can be determined by looking at the settings in the daq .cnf file for the appropriate hutch (e.g. /cds/group/pcds/dist/pds/tmo/scripts/tmo.cnf for the tmo hutch). 

The "-p" port_number can be determined with a command similar to the following.  If no "-p" option has been given to ami-manager then a default is being used, and no port number needs to be given to ami-client above.

Code Block
(ps-4.5.17) rix-daq:scripts> procmgr status rix.cnf | grep manager
drp-srcf-cmp029 ami-manager_first RUNNING    53589   29205  ami-manager -p 5655 --hutch rix_first --prometheus-dir /cds/group/psdm/psdatmgr/etc/config/prom/rix -n 4 -N 1
(ps-4.5.17) rix-daq:scripts> 


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 selection logic is 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 ways.  An example flowchart and PythonEditor box is shown below.  Other boxes can also handle filtering with their "conditional" attributes.

...