# Welcome to Grainspotter

`Grainspotter` by Soeren Schmidt is a program for spotting grains in a set of G-vectors produced by ImageD11.
This program comes with an interface to ImageD11 for reading gvector files. In addition to the gvector file, an initialization file must be configured. See example below :
The initiallization must be configured with the following set of tags (keyword value !comment):

index.ini for Grainspotter 0.8 and later

spacegroup 225 | ! Space Group nr The space group id is needed to calculate the Equivalent matrices used in the ps eudotwin analysis.
dsrange 0 0.35 | ! dsrange [min max], d-spacing range, multiple ranges can be specified
tthrange 0 9.2 | ! tthrange [min max], multiple ranges can be specified
etarange 0 360 | ! etaspecs [min max] in degrees The active interval in the eta angle. OBS you can put in more than one interval.
omegarange -45 45 | ! omega range [min max] in degrees The active interval in the omega angle. OBS also here more ranges can be provided.
domega 1 | ! [stepsize] in omega, degrees
filespecs in.gve out.log | ! dataspecs [gvecsfile grainsfile] Path and filenames of the input gvectorfile, gvecfile, (from ImageD11) and the output grains file containing the crystallographic orientations, grainsfile.
cuts 8 0.7 | ! min_measuments min_completeness Minimum requirements for accepting a grain solution: Minimum number of gvectors assigned to the grain, min_measurements (integer>3), and the minimum fraction of expected reflections assigned to the grain, min_completeness (float, 0 less than min_completeness less or equal to 1).
eulerstep 6 | ! Step size in Euler space in degrees The step size in Eulerspace for phi1 and phi2 [0:180], PHI is sample in 180/eulerstep steps according to the
uncertainties 0.01 0.2 1.0 | ! sigma_tth sigma_eta sigma_omega in degrees Until full error estimation is available on the gvectors in the input gvector file, sigma_tth, sigma_eta and sigma_omega give YOUR estimation on the uncertainties in degrees on eta, omega and tth.
nsigmas 2 | ! maximal deviation in sigmas Gives the maximal deviation when comparing two quantities. Generally, |d_quantity| lt; nsigmas * sig_quantity.
Nhkls_in_indexing 10 | ! use first Nhkls_in_indexing hklfamilies in indexing Uses the first Nhkls_in_indexing hklfamilies to recover the crystallographic orientations. Afterwards the search for additional gvectors belonging to the grain is done on the remaining rings.
minfracg 0.2 | ! stop search when minfracg (0..1) of the gvectors have been assigned to grains
random 10000 | ! use randomly chosen orientation seeds #trials
positionfit | ! fit the position of the grain

You can disable an option word by setting ! at the beginning of the line, as you can see for comments