Ok, I have been playing around with the data that you sent me, and I
can mostly get the program to read in the file. I have uploaded a beta
of version 2 of the program (with several other changes) that can
mostly read in the Bruker data you sent me. (
http://code.google.com/p/
areadiffractionmachine/downloads/detail?name=Area%20Diffraction
%20Machine%20v2_beta_r194.zip&can=2&q=#makechanges). When I get really
convinced that my code is doing the right thing reading these files
in, I will move the feature down into the more stable version 1 of the
program.
Matt, is there any way you can open my program with a bunch of your
data and see if it causes any weird errors?
I have a couple of concerns about the way the code is now reading data
in. If you or anybody you know knows anything about these bruker
files, I have a couple of questions. First, it looks like Bruker files
can contain 8 bit and 32 bit Bruker data. I have no idea if my program
will properly read this data in because I don't have any data to test.
Do you have any 8 or 32 bit data I can test the program with? Also,
because of the way my program stores the data, any 32 bit data which
is above 2^31-1 would be clipped to 2^31-1. Hopefully, this won't be a
problem.
When I examine the files you sent me, there are 512=32*16 bytes at the
end of the file that I can't figure out what to do with. They are not
part of the regular image. Apperently there is a way to store at the
end of a Bruker file overloaded pixels and each overloaded pixel takes
up 16 bytes. So it sounds like there are 32 overloaded pixels at the
end of the file. But the number of overloaded pixels is supposed to be
set in the header with the "NOVERFL:" value and in both of the files
the value is set to 0. So I am not really sure what is going on. It
might be that the program that wrote the file improperly set the
header value NOVERFL. Right now, the program just doesn't try to read
in any overloaded data. But If you have any data where the header
value NOVERFL is not 0 or any other ideas about what the data at the
end really is, I am all ears.
Finally, I can find the detector to sample distance, the wavelength,
and the x and y center of the image in the header. But I can't find
the pixel length and pixel height of the detector. This is the width
and height of a pixel on the detector (in microns). If you know where
in the header these values are (or at least what these values actually
are for the detector that took the data), that would help me.
Finally, the files you sent me have a .002 extension but do all Bruker
files have a .002 extension. Right now, I have the default extension
of bruker data .bruker but I know this is not right. Do you know what
the default extension should be?
Josh