Versions Compared

Key

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

...

Panel

Anchor
event.Event
event.Event

Class 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 seq()

Usage: s = evt.seq()

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


Method getTime()

Usage: t = evt.getTime()

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


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 getAcqConfig()

Usage: acqConfig = evt.getAcqConfig(address)

Returns Acqiris configuration data of type acqiris.ConfigV* for specific device. If address given is not very specific then the first matching object is returned.

Parameters:

Ordinary configuration objects are contained in a Configure type datagrams only. For client code that means that this method can be used in beginjob() or beginrun() methods only. Note also that configuration objects are stored in the Pyana environment and preferred way to access configuration information is through the environment. This makes this method of little utility to end users.


Method getOpal1kConfig()

Usage: opalConfig = evt.getOpal1kConfig(address)

Returns Opal1k configuration data of type opal1k.ConfigV* 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)

Same caveats apply as for getAcqConfig() method.


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 getPnCcdValue()

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

returns pnCCD data object of type pnccd.FrameV* 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)
  • env – environment object containing pnCCD configuration object

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 getPhaseCavity()

Usage: obj = evt.getPhaseCavity()

Returns data object of type bld.BldDataPhaseCavity.


Method getEBeam()

Usage: obj = evt.getEBeam()

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

...

Panel

Anchor
pypdsdata.acqiris.DataDescV1
pypdsdata.acqiris.DataDescV1

Class DataDescV1

This class overrides several methods in the corresponding [_pdsdata.acqiris.DataDescV1|#_pdsdata.acqiris.DataDescV1} class to simplify user API.


Construction

Usage: dd = DataDescV1(orig, hcfg, vcfg)

Arguments:


Method nbrSamplesInSeg()

Usage: nsampl = dd.nbrSamplesInSeg()

Returns integer number.


Method nbrSegments()

Usage: nseg = dd.nbrSegments()

Returns integer number.


Method timestamp()

Usage: ts = dd.timestamp(segment)

Returns object of acqiris.TimestampV1 type.

Arguments:

  • segment - segment number

Method waveform()

Usage: wf = dd.waveform()

Returns waveform array of numpy.ndarray type.


Method timestamps()

Usage: ts = dd.timestamps()

Returns NumPy array of timestamps (floating numbers). First element of array is always 0, other elements are equidistant with the distance and number of intervals determined by acqiris.HorizV1 object.

--------------

Module pypdsdata.pnccd

Panel

Anchor
pypdsdata.pnccd.FrameV1
pypdsdata.pnccd.FrameV1

Class FrameV1

This class overrides several methods in the corresponding [_pdsdata.pnccd.FrameV1|#_pdsdata.pnccd.FrameV1} class to simplify user API. In particular it merges four images from PnCCD into one larger image.


Construction

Usage: frame = FrameV1(frames, config)

Arguments:


Method specialWord()

Usage: val = frame.specialWord()

Returns integer number.


Method frameNumber()

Usage: val = frame.frameNumber()

Returns integer number.


Method timeStampHi()

Usage: val = frame.timeStampHi()

Returns integer number.


Method timeStampLo()

Usage: val = frame.timeStampLo()

Returns integer number.


Method data()

Usage: val = frame.data()

Returns frame data as NumPy 2-dimensional array of integers of size 1024x1024.


Method sizeofData()

Usage: val = frame.sizeofData()

Returns integer number.