Created
August 1, 2014 00:22
-
-
Save ZGainsforth/daa7d0a0a5906070907b to your computer and use it in GitHub Desktop.
Read Bruker raw datacube into numpy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from numpy import * | |
| from matplotlib.pyplot import * | |
| # Read in the raw | |
| x = fromfile('Stack 1 - 360s.raw', dtype='int8') | |
| # reshape to x, y, E | |
| x.shape=(300,300,2048) | |
| # Make integrated image and show it. | |
| y = sum(x, axis=-1) | |
| imshow(y) | |
| show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment