Just to follow up, I would like to have a Mantid algorithm that produces an event file list of Qx,Qy,Qz for each event. The Q coordinates are not pixels or voxels, but just calculated coordinates. In ISAW, this is accomplished with the EventToEventQ operator created by Dennis.
Below is a portion of a Python script which reads the binary file.
# Read the events from binary file----------------------------- - - -
events_fname = events_directory + 'TOPAZ_' + srun + '_EventsToQ.bin'
input = open(events_fname, 'rb')
print 'The EventsToQ.bin file is ' + events_fname
print ''
numberOfEvents = 0
while True:
# if numberOfEvents == 1e05: break
lineString = input.read(12)
if lineString == "": break
Qx, Qy, Qz = struct.unpack('fff', lineString) # unpack binary data
numberOfEvents = numberOfEvents + 1
if (numberOfEvents % 100000) == 0: print '\rEvent %.3e' % numberOfEvents,
Here is the email he sent with the request:
Just to follow up, I would like to have a Mantid algorithm that produces an event file list of Qx,Qy,Qz for each event. The Q coordinates are not pixels or voxels, but just calculated coordinates. In ISAW, this is accomplished with the EventToEventQ operator created by Dennis.
Below is a portion of a Python script which reads the binary file.