Versions Compared

Key

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

...

Panel

Anchor
pyana.event.Event
pyana.event.Event

Class pyana.event.Event

Instance of this class contains all event data.


Construction

Usage: evt = pyana.event.Event(dg)

Creates event object from the corresponding XTC datagram object.

Parameters:


Method damage()

Usage: val = evt.damage()

Returns object of type _pdsdata.xtc.Damage representing damage mask. The damage mask is returned for the top-level XTC, individual sub-objects may contain different damage masks.


Method find()

Usage: objects = evt.find(...)

Returns possibly empty list of data objects contained in the event. This method accepts a number of arguments, but all arguments are optional. If no arguments are given then a list of all data objects is returned. If some arguments are given then only those objects that satisfy a particular criteria are returned. The list of possible keyword arguments:

  • typeId – accepts enum xtc.TypeId.Type, only return objects which have that TypeId
  • version – accepts number, only return objects whose type version number is equal to number
  • level – accepts one of xtc.Level values, only returns objects originated at that level
  • detector – accepts enum xtc.DetInfo.Detector values, only returns objects produced by this detector
  • detId – accepts number, only returns objects produced by this detector ID
  • device – accepts enum xtc.DetInfo.Device values, only returns objects produced by this device
  • devId – accepts number, only returns objects produced by this device ID
  • addressxtc.DetInfo object or an address string (see User Manual)

The parameters address and any of the detector, detId, device, devId are incompatible, specify only one or another.


Method findFirst()

Usage: object = evt.findFirst(...)

Accepts the same set of arguments as find() methods but instead of list of objects returns fist object found. If no object is satisfying all selection criteria then None is returned.


Method get()

Wiki Markup
Usage: {{data = evt.get(_typeId_, \[_address_\])}}

This is a generic method for finding an object of given type. If address is not given or is not very specific then the first matching object is returned. Note that this method returns original data types defined in _pdsdata package, not those enhanced types from pypdsdata package.

Parameters:


Method getAcqValue()

Usage: acqData = evt.getAcqValue(address, channel, env)

Returns Acqiris data object of type pypdsdata.acqiris.DataDescV* for specific device and channel. If address given is not very specific then the first matching object is returned.

Parameters:

  • addressxtc.DetInfo object or an address string (see User Manual)
  • channel – channel number from 0 to max number of channels
  • env – environment object containing Acqiris configuration object

Channel number is an integer number, total number of channels can be extracted from the Acqiris configuration object.


Method getEBeam()

Usage: obj = evt.getEBeam()

Returns data object of type bld.BldDataEBeam or bld.BldDataEBeamV0 whichever is present in the event.


Method getEvrData()

Usage: obj = evt.getEvrData(address)

Returns data object of type evr.EvrDataV* for given address.

Parameters:

This method is equivalent to evt.get(xtc.TypeId.Type.Id_EvrData, address).


Method getFeeGasDet()

Usage: array = evt.getFeeGasDet()

Wiki Markup
Returns the list of 4 numbers {{\[f_11_ENRC, f_12_ENRC, f_21_ENRC, f_22_ENRC\]}} obtained from [{{bld.BldDataFEEGasDetEnergy}}|#_pdsdata.bld.BldDataFEEGasDetEnergy] object.


Method getFrameValue()

Usage: frame = evt.getFrameValue(address)

Returns frame data object of type camera.FrameV* for specific device. If address given is not very specific then the first matching object is returned.

Parameters:

This method is equivalent to evt.get(xtc.TypeId.Type.Id_Frame, address).


Method getIpimbValue()

Usage: frame = evt.getIpimbValue(address)

Returns frame data object of type ipimb.DataV* for specific device. If address given is not very specific then the first matching object is returned.

Parameters:

This method is equivalent to evt.get(xtc.TypeId.Type.Id_IpimbData, address).


Method getOpal1kValue()

Usage: frame = evt.getOpal1kValue(address)

This methods is an alias for getFrameValue().


Method getPhaseCavity()

Usage: obj = evt.getPhaseCavity()

Returns data object of type bld.BldDataPhaseCavity.


Method getPnCcdValue()

Usage: frame = evt.getPnCcdValue(address, env)

returns pnCCD data object of type pypdsdata.pnccd.FrameV* for specific device. If address given is not very specific then the first matching object is returned.

Parameters:

  • addressxtc.DetInfo object or an address string (see User Manual)
  • env – environment object containing pnCCD configuration object

Method getPrincetonValue()

Usage: frame = evt.getPrincetonValue(address, env)

Returns Princeton frame object of type pypdsdata.princeton.Frame* for specific device. If address given is not very specific then the first matching object is returned.

Parameters:

  • addressxtc.DetInfo object or an address string (see User Manual)
  • env – environment object containing Acqiris configuration object

Method getTime()

Usage: t = evt.getTime()

Returns _pdsdata.xtc.ClockTime object, equivalent to dg.seq.clock()


Method run()

Usage: run = evt.run()

Returns run number as integer value. Run number is extracted from the file names being processed. When the file name cannot be determined or has unknown format the above method will return negative number.


Method seq()

Usage: s = evt.seq()

Returns _pdsdata.xtc.Sequence object, equivalent to dg.seq

...