Versions Compared

Key

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

...

Code Block
 -- pyami module --

connect(Server_Group, CDS_interface, FEZ_interface)
    Connects the module to the group of monitoring servers.
    The input parameters are specific to the hutch.
    If the last two parameters are omitted, they will be learned from the
    available network interfaces on the host.
    This must be called before any of the following class methods.

connect(PROXY_ip_address, CDS_interface)
    Connects the module to the group of monitoring servers known by the PROXY.

discovery()
    Returns a list of detectors available for monitoring.

set_l3t(filter_string)
    Sets the current DAQ L3T filter to <filter_string>.  See "event filter" below.

clear_l3t()
    Removes the DAQ L3T filter. 

class pyami.Entry(name) or
class pyami.Entry(name,'Scalar')
    Monitors data from the scalar variable 'name'.  A dictionary of
    (type='Scalar', time=<last event time in seconds since the Epoch>, 
     entries=<number of events accumulated>, mean=<value>, rms=<value>) is accumulated.

class pyami.Entry(name,'TH1F',nbins,xlo,xhi)
    Monitors data from the scalar variable 'name'.  A dictionary of
    (type='TH1F', time=<last event time in seconds since the Epoch>,
     uflow=<number of underflows>, oflow=<number of overflows>, data=( n_bin0, n_bin1, ...)) is accumulated.

class pyami.Entry(name,'Scan',xvariable,nbins)
    Monitors data from the scalar variable 'name'.  A dictionary of
    (type='Scan', time=<last event time in seconds since the Epoch>,
        nbins=<value>, current=<index of most recent entry>, xbins=( x0, x1, ...), yentries=( n0, n1, ...),
        ysum=( y0, y1, ...), y2sum=( y2_0, y2_1, ...)) is accumulated; where
    'current' is the bin with the most recent entry, 'xbins' is a list of unique x-variable values,
    'yentries' is a list of the number of summed entries with that x-variable value,
    'sum' is a list of the sum of y-variables values in each bin, 'y2sum' is a list of the sum
    of y-variable values squared in each bin.  The lists are of length 'nbins' with only the most
    recent entries retained.

class pyami.Entry(det_identifier) or
class pyami.Entry(det_identifier,channel)
    Monitors the data from the detector associated with 'det_identifier' and
    'channel'.  A dictionary of data averaged over events is accumulated.  The
    dimensions and binning of the data are determined from the detector.
    The dictionary format is
    (type='Waveform', time=<last event time in seconds since the Epoch>
        entries=events, xlow, xhigh, data=(y0, y1, ...)) or
    (type='Image', time=<last event time in seconds since the Epoch>,
        entries=events, offset=dark_level, ppxbin, ppybin,
        data=((row0col0,row0col1,...),(row1col0,row1col1,...))) or
    (type='ImageArray', time=<last event time in seconds since the Epoch>,
        entries=events, offset=dark_level, ppxbin, ppybin,
        data=( ((row0col0,row0col1,...),(row1col0,row1col1,...))_0,
               ((row0col0,row0col1,...),(row1col0,row1col1,...))_1,
               ... ))

    "event filter"
    Each of the above methods also takes an optional final string argument that
    defines an event filter.  The string must take the form:
    
        _lo_value_<_scalar_name_<_hi_value_  or
        (_expr1_)&(_expr2_)                  or
        (_expr1_)|(_expr2_)

    where _expr1_ and _expr2_ also take one of the forms.

Members:

    Entry.get()
        Returns the data accumulated since the object was created.
    Entry.clear()
        Resets the data accumulation.
    Entry.pstart()
        Start continuous mode accumulation ("push" mode).
    Entry.pstop()
        Stop continuous mode accumulation.
    Entry.pget()
        Return continuous mode data.  

"Push" mode description:

    The event data is "pushed" to the python module's application by the monitoring servers once the Entry.pstart() command is given.  The Entry.pget() call simply waits for the data to arrive, if necessary, and returns it to the caller.  The Entry.pstop() command instructs the servers to cease sending the data.  Note that this mode can easily consume considerable network bandwidth on the local machine.


class pyami.EntryList([list of arguments that satisfy pyami.Entry above])
     Defines a list of objects to access using the same resources as one pyami.Entry object.  The list of objects is accessed synchronously, so each object's accumulation of events will be the same.

Members:

    EntryList.get()
        Returns a list of the data accumulated since the object was created.
    EntryList.clear()
        Resets the data accumulation.
    EntryList.pstart()
        Start continuous mode accumulation ("push" mode).
    EntryList.pstop()
        Stop continuous mode accumulation.
    EntryList.pget()
        Return a list of the continuous mode data.