Ticket #6120 (closed: fixed)
Generate Q-vector file for Schultz
Reported by: | Peter Peterson | Owned by: | Peter Peterson |
---|---|---|---|
Priority: | major | Milestone: | Release 2.4 |
Component: | Mantid | Keywords: | |
Cc: | ajschultz2@… | Blocked By: | |
Blocking: | Tester: | Vickie Lynch |
Description
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.
# 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,
Change History
comment:2 Changed 8 years ago by Peter Peterson
Re #6120. Removing commented out code.
Changeset: e5fbe07aa64f0c45e8e55aa3b9331a9821c3986c
comment:3 Changed 8 years ago by Peter Peterson
Re #6120. Forgot to convert to -1.*Qvector.
Changeset: 46fc5cc70df2acc76a202b8c411d7339df8873b9
comment:4 Changed 8 years ago by Peter Peterson
Re #6120. Fixing snowleopard build.
Mac's version of ofstream's constructor requires a c-string.
Changeset: 4f966f75fb31448baecac82534d05879e140965e
comment:5 Changed 8 years ago by Peter Peterson
Re #6120. Added ISAWcoords and right-handed options.
Since these are points that people may have different opinions on, allow for user selection.
Changeset: b9cf1fcef39a753d055ab42cc5f0268a3c2f5de4
comment:6 Changed 8 years ago by Peter Peterson
Re #6120. Correcting the coordinate transformation.
Changeset: f3a9a401ebd98564c505c58fe151a88deee47c6a
comment:8 Changed 8 years ago by Peter Peterson
- Status changed from accepted to verify
- Resolution set to fixed
comment:9 Changed 8 years ago by Peter Peterson
Re #6120. New algorithm for saving Q-vector file for Art.
First full version of the algorithm and tests. See the ticket for more info on what it actually does.
Changeset: a760dc7c4672ab06c7ed4f0a8f330aeaf558accd
comment:10 Changed 8 years ago by Peter Peterson
Re #6120. Removing commented out code.
Changeset: 6176ec80f63bd278e95f83f0b39cb43309f3e59c
comment:11 Changed 8 years ago by Peter Peterson
Re #6120. Forgot to convert to -1.*Qvector.
Changeset: eadb46c7489813c9ce46e0c719dbbd4db5afa2d7
comment:12 Changed 8 years ago by Peter Peterson
Re #6120. Fixing snowleopard build.
Mac's version of ofstream's constructor requires a c-string.
Changeset: 94af17fffc511bc69e99edefaa001bfb554a1532
comment:13 Changed 8 years ago by Peter Peterson
Re #6120. Added ISAWcoords and right-handed options.
Since these are points that people may have different opinions on, allow for user selection.
Changeset: 58fded08e5c98073b22439f166593688394aff71
comment:14 Changed 8 years ago by Peter Peterson
Re #6120. Correcting the coordinate transformation.
Changeset: c2560f050a2501c37c5a3edf71e9ecab82d6a398
comment:15 Changed 8 years ago by Vickie Lynch
- Status changed from verify to verifying
- Tester set to Vickie Lynch
comment:16 Changed 8 years ago by Vickie Lynch
- Status changed from verifying to closed
Easily creates a large binary file of events. I assume Art has checked that these numbers are OK.
comment:17 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 6966
Re #6120. New algorithm for saving Q-vector file for Art.
First full version of the algorithm and tests. See the ticket for more info on what it actually does.