This is an old revision of the document!
Table of Contents
GrainSpotter
GrainSpotter is a software which looks for grains in a 2D diffraction image. It was developed by S. Schmidt, Technical University of Denmark. See the publication for more information:
Søren Schmidt
GrainSpotter: a fast and robust polycrystalline indexing algorithm
J. Appl. Cryst. (2014). 47, 276-284
https://doi.org/10.1107/S1600576713030185
Installing GrainSpotter
Necessary Hardware and Software
First of all, you will need Linux, either as a separate harddrive (with lots of memory space) or as a virtual machine on your Windows/Apple computer. In case you are not familiar with Linux, ask your administrator for help and maybe do an online crash course to learn basic navigation and so on.
Installation
You have basically two options for getting GrainSpotter. One is with the help of Anaconda, the other one I forgot. However, Anaconda is the more convenient one, anyway. So first of all, get yourself Anaconda: https://www.anaconda.com/download/#linux
Then go to the Anaconda Cloud with your browser and search the cloud for grainspotter. Then click on Files and download the Linux version. Unpack it to a directory of your choice.
Go back to your browser and click on Conda. There is a short code which is necessary to install GrainSpotter. It should be something like this:
conda install -c fable grainspotter
Copy the code to your Konsole and follow the installation instructions.
Running the software
The .ini file
To run it, you need a file with the ending .ini. When you perform a simulation with PolyXSim, it should automatically create such a file. It usually looks like this:
spacegroup 136 ! spacegroup [space group nr] !dsrange 0 4.2 ! dsrange [min max], d-spacing range, multiple ranges can be specified tthrange 0 25 ! tthrange [min max], multiple ranges can be specified etarange 0 360 ! etarange [min max], multiple ranges can be specified domega 0.5 ! domega [stepsize] in omega, degrees omegarange -28 28 ! omegarange [min max] degrees, multiple ranges can be specified filespecs g_vectors.gve grains.log ! filespecs [gvecsfile grainsfile] cuts 5 0.6 0.8 ! cuts [min_measuments min_completeness min_uniqueness] eulerstep 6 ! eulerstep [stepsize] : angle step size in Euler space uncertainties 0.1 0.2 .5 ! uncertainties [sigma_tth sigma_eta sigma_omega] in degrees nsigmas 2 ! nsigmas [Nsig] : maximal deviation in sigmas !minfracg 0.2 ! stop search when minfracg (0..1) of the gvectors have been assigned to grains !Nhkls_in_indexing 15 ! Nhkls_in_indexing [Nfamilies] : use first Nfamilies in indexing random 10000 ! use randomly chosen orientation seeds #trials !positionfit ! fit the position of the grain
You should adjust the .ini file for your specific purposes. Explanations of the .ini file are listed below.
| spacegroup | enter the space group number |
| dsrange | … |
| cut_first number | grain is chosen if there are at least this amount of peaks per grain |
| cut_second number | grain is chosen if there are at least this fraction of the expected peaks present |
| cut_third number | put in any number |
Running GrainSpotter
When you think your .ini file should be fine, it is time to “spot grains” (at least this is what the software should do according to its name). For this type the following to the Konsole:
grainspotter some_file_name.ini
If you didn't get your GrainSpotter from Anaconda but from somewhere else, the syntax is slightly different:
GrainSpotter.0.90 some_file_name.ini
