Subject: Common structure / function for event access Dear all, during our meeting at DSRI, Niels Jørgen, Stefan and I had some discussion about shared functions. One of the agreed propositions was that while DAL3JEMX prefers to give you access column by column to event data - which saves memory and some read overhead - we usually need to have (almost) all this information anyhow. Instead of having N loosely related arrays, software would be more reader friendly and function interfaces could be simplified in the future if we had a C struct for events and a single function to read all event information of a ScW matching some selection. My action was to propose the interface for such a function, which is done herewith. I guess the developers among you find the following self-explanatory - in a library delivery it would be extensively commented. typedef struct { unsigned short rawX; unsigned short rawY; float detX; float detY; unsigned short PHA; unsigned short PI; unsigned short greyFilter; OBTime obTime; double ijdTime; unsigned int status; } JEMXevent; With this struct one defines an event list as JEMXevent *events=NULL; and once it's allocated and filled can access information like in these arbitrary examples if (event[k].PHA > minPHA) { ... } radiusFromCenter = sqrt( event[i].detX * event[i].detX + event[i].detY * event[i].detX ); int JEMXeventsGet(dal_element *group, Instrument jemxInstrument, JEMX_type eventType, ISDCLevel level, int numGTIs, OBTime gtiStart, OBTime gtiStop, const char* *rowFilter, JEMXevent **events, int callingStatus); This function would combine all the function calls needed to find the number of events, allocate a suitable buffer [this bends CTS but so does, e.g. DAL3AUX] and read in all the columns relevant for the given event type and level (RAW, PRP, COR). I've kept the scheme currently in DAL3JEMX in that one passes a list of GTIs read in before for selection, because I find it very convenient. Please let me know how you think about this, writing the whole function would cost me a few hours at most. Regards, Peter