Well, I’m one of those guys who believes a picture is usually worth a ton of words. I’ve got a few images to share here on the matlab code I’ve been working on for reciprocal space mapping in MATLAB. I’m still not 100% on my code right now, so I’m not sharing it for the time-being. In particular, I use an import function for .x00 slices for two-axis scans in the Panalytical/Philips XPert system. If you are using XRDML, skip the files for .x00 import that I have in other posts on this blog. In anycase, without much explanation here are the images…
Matlab
Software For Scientists: Engauge Digitizer
In the time I’ve been doing my research work at the Univ. of IL, I’ve come across a number of graphs from various past researchers, older papers, stuck on the side of machines (calibration curves), and even hand-drawn or chart-recorder graphs in my numerous projects. The only major problem with those graphs I’ve found is that they aren’t in a digital form for further use with other data (instrument response functions) or to include in your own work as a reference. So, what to do?
Well, there’s an easy solution. It’s not the perfect solution, as it’s a bit slow, I’ll get to that in a second, but it’s a great solution to the problem, and has worked for me a number of times now. To top it off, it’s open-source, donation-ware, and cross-platform: Engauge Digitizer (see post at LifeHacker.com). Don’t let the website and lack of recent updates deter you. Tools that can do what Engauge does are few and far between. So, it is definitely worth a try. Here’s an example of how I’ve used it just the other day (prompting this post- I’ve used it for years now, but the recent use reminded me I should share it with others). [click "More" to see an example use and learn more]
Part III: Matlab Function for Xpert XRD Reciprocal Space Mapping
A series of MATLAB functions will follow. Some of these “.m” files call each other, so ensure you have all of them before you start.
The purpose of this file is to load in all the .x00 files in a directory of Omega-Omega-2-Theta slices for reciprocal space mapping of a sample. “OmegAxis” determines the scale for the Omega axis (y) for reciprocal space mapping. [again, this is not yet in Q-space, that will come at a later date]
The first function loads data into your workspace for a directory of .x00 files that have a common base filename. The user needs to supply the first index number and last index number for loading the files. The program then attempts to load “filenameIndex.x00″ in a linear fashion for all .x00 files of that filename indexed in the cd’d directory. [Change directory to the working directory needed before starting this function.]
Part II: Matlab XRD- reciprocal space maps from XPert XRD files (.x00)
A series of MATLAB functions will follow. Some of these “.m” files call each other, so ensure you have all of them before you start.
The purpose of this file is to load in all the .x00 files in a directory of Omega-Omega-2-Theta slices for reciprocal space mapping of a sample. Please note that as of this writing, the data has not yet been converted to Q-space.
The first function loads data into your workspace for a directory of .x00 files that have a common base filename. The user needs to supply the first index number and last index number for loading the files. The program then attempts to load “filenameIndex.x00″ in a linear fashion for all .x00 files of that filename indexed in the cd’d directory. [Change directory to the working directory needed before starting this function.]
Intro to Multipart Post: Reciprocal Space Mapping (XRD) for XPert in MATLAB
There will be a number of posts following this one that will attempt to recreate reciprocal space mapping in MATLAB. The functions that will be posted in the coming days read in .x00 files from the Philips XPert XRD system and try to recreate the slices of Omega Omega-2Theta scans produced for reciprocal space mapping.
Currently I haven’t changed the data into Q-space, so they will be reported in Omega -v- Omega2Theta space.
An example call to the function is:
DisplayQSpace1('',9,184);
Example output of the function(s):

Part I: MATLAB Functions for Philips XPert XRD Files
I decided here and there to publish various MATLAB functions I’ve written for my own work. There’s just one caveat- each one of these is a serious work in progress. In fact, they may not progress much more than what is disclosed here since they get the job done for me.
But, I felt that this likely would help a few people who are trying to do the same type of thing, and I’d rather ease those who come after me, and give them a slight step ahead if possible.
For those of you with old version of the Philips XPert XRD software (specifically those who can’t output in XRDML files), I offer a crude import function for simple scans.




