You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

 

Issues:

  • how will AMI elegantly handle dict/list attributes?
  • how will AMI elegantly handle complex types like the list of times/peaks from the hsd fex?  Maybe stick to raw hsd data in AMI for now?
  • how do the low-level attributes get access to config/calib? (later: I think by passing them in from _instantiate_det_xface in Event.py)
ProposalArguments In FavorArgument Against
Data shall be accessible with a syntax like evt.xppcspad.attr1.attr2allows for easy tab-completion exploration of the contents of an event 
attr1 above is the "data type" (e.g. raw, roi1, roi2). each "data type" corresponds to a detector interface class, currently in psana/psana/detector/detectors.py. attr2 is used for the various fields supported by that data type (e.g. for an roi data-type, this might be the roi data, and the "corners" of the roi for that particular event).  
All attributes must exist on every event, with the lowest-level attribute returning None if the data is not accessible for any reason (e.g. missing detector, missing raw data, missing calibration constants). we should create a mechanism for the user to discover the reason why the data is missing.makes user code simpler to check for missing informationcomputationally expensive to add all attributes when data is not present
No functions allowed. Configurable parameters (e.g. common-mode params) will be set with other attributesease-of-use in AMIartificial constraint on use of python. perhaps we have to do, for example, det.image(unassembled)?
All attributes should be discoverable on the Configure transition using the software/version information ease-of-use in AMI 
Attributes will be automatically attached to each event by psanaease-of-use 
One (small) additional user-interface layer will exist: det = Detector('xppcspad'), where det(evt) will return evt.xppcspad. This will not be used by AMI.enables definition of detector names outside event loops 
The preferred lowest level attribute would be a fundamental type (int, float, numpy array) or a dict/list of fundamental types (e.g. xpphsd.chan[3]). For the HSD detector it will be a dict, since only a subset of channels will be active, in general. There are also more complex data not covered by these cases: e.g. xpphsd.fex.chan[0] returns a list of (times, peaks) which is a "complex type" that would need special handling in AMI.  
  • No labels