User Tools

Site Tools


processing:indexing_with_grainspotter

This is an old revision of the document!


Grain indexing with GrainSpotter

At this point, you should have a computed all experimental G-vectors. You are now ready for indexing grains with GrainSpotter.

GrainSpotter first generates a number of random grain orientations and, for each, calculates the corresponding theoretical G-vectors. For each grain orientation, GrainSpotter looks for a possible match between the theoretical G-vectors and those found in the experiment. If the convergence criteria are met (see details below), the grain is assigned.

Estimation of the uncertainties

For the indexation, uncertainties in 2θ, η and ω will be critical for assigning the experimental G-vectors to a grain. You can use Fabian to estimate uncertainties on ω and η and ImageD11 to estimate uncertainties in 2θ.

In Fabian, load your peaks from the peaksearch and overlap them with the diffraction data (CrystTools > Peaks > read). In ImageD11, display your peaks as 2θ/η plot. You can then evaluate the maximum δ2θ, δη, and δω ranges you can use to avoid mixing up peaks.

ImageD11 is not a good tool for evaluating δη and δω as all peaks extracted for all ω are stacked on the same plot. It is the only tool, however, that will allow you to evaluate δ2θ.

Result of a peak search displayed in Fabian. Red circles are peaks. Using Fabian you can estimate the maximum δη interval (azimuthal coordinate on the detector plane) that can be used without confusing peaks. By moving from one image to the next, you can also estimate the maximum value of δω interval that can be used while avoiding confusion between peaks.
2θ/η plot in ImageD11. This can be used to assign a maximum δ2θ interval that will avoid confusion between the diffraction lines. Pay attention to this step. If your 2θ uncertainty is too large, this indexing will be completely wrong.

Indexing grains

You are now ready to start indexing your g-vectors with GrainSpotter.

GrainSpotter works with an input file, typically ending with a .ini extension in which you should define

  • the crystal structure of the grains you are looking for,
  • the 2θ, η and ω ranges in which to look for g-vectors, the 2θ can also be expressed in d-spacing range,
  • the cuts, above which a grain is considered a grain,
  • the uncertainties in 2θ, η and ω,
  • a nσ factor that will be applied to the uncertainties above,
  • the number of random tries.

Changing the 2θ range allow you to exclude some domains where the peaks are not well defined.

You should play on the cut and the uncertainties to found the settings with the best indexation. Increasing the minimum of measurements allow to decrease the number of erroneous indexed grains but it limits the number of indexed grains found. The uniqueness and the completeness do not have a great importance on the indexation (I set both to zero in my best indexation scenario). For defining the uncertainties, use the plot from fabian and ImageD11.

Increasing random number increase the number of grains indexed but slow a bit the calculation.

When your input file is ready, type :

 GrainSpotter.0.90 index.ini

or

 GrainSpotter index.ini

or

 grainspotter index.ini

The command you need depends on which version you use. There shouldn't be any differences but still, we don't know for sure.

Grain indexing with ImageD11

First, get a gve file from ImageD11 as seen before.

Then go in ImageD11 > Indexing > load gve and call your gve file. Use Assign peaks to powder rings. This command will show all the theoretical peaks of the unit cell (for the phase you define in trnasformation > parameters) and the measured peaks it assign at each theoretical peaks.

Hit generate trial orientation then score trial orientation.

Should a button somwhere to define the indexing parameters...

indexing the peaks

use :

python idx_0.py

in that script, you need to load your gve file (from ImageD11), your parameters file (from ImageD11) and your flt file (from peaksearch). Don't forget to specify the name of the ouput file. In the line myindexer.parameterobject.set_parameters, you can set the indexing parameters (mainly minpks and hkl_tol). To specify the rings you want to use for the indexation, copy the list of peaks from Assign peaks to powder rings in the bloc below rings = [] and enter in that rings = [] list the index of the rings you want to use. This script will pair every ring with all the other to index the peaks in grains. At the end, it will give you the number of grains it found. Once it is finish, the indexed grains are stored in a ubi file and you can get back the not indexed grains to run idx.py again with more generous parameters and try to found more grains with the left peaks. To end the indexing, we use :

makemap.py -p parameters.prm -f peaks_to.flt -u to.ubi -U t0.map –omega_slope=.25 -t .03

To have a look at what you indexed, you can plot different things : (command for plot were written in a Xterm terminal)

-the number of peaks in grains vs the error :

-the number of peaks in a grain vs the intensity : from ImageD11.columnfile import * c = columnfile(“peaks_t0.flt.new”) c.parameters.loadparameters(“parameters.prm”) c.updateGeometry() clf() c.filter(c.tth<13) % we only keep the rings below 13° cause after it's too low intensity plot(c.tth[~(c.labels>=0)], log(c.sum_intensity[~(c.labels>=0)]),“,”) or : plot(c.labels, log(c.sum_intensity),“,”) to save it : c.writefile(“t0la.flt”)

-plot tth vs intensity : plot(d.tth, d.sum_intensity,“o”,ms=5) (with d the variable containing the peaks)

-??

plotgrainhist.py peaks_t0.flt parameters.prm t0.map .05 10 .25

Using only the best rings

We run into the problem that in simulated datasets, a large number of peaks have an intensity below 1 and when saving the images, these intensities are rounded at 0. Consequently, these peaks are not detected anymore by the software.

To resolve this issue, we want to consider only peaks with large intensity. So, to select the rings we want to use :

python pickrings.py ../Simulation/simu_FoCIF_omega-28-28_1000grains.flt parameters.prm fewr_ideal.flt

After that, run again the indexation (idx_0.py) with your new flt file.

For now, we still miss grains…

processing/indexing_with_grainspotter.1559897546.txt.gz · Last modified: 2019/06/07 08:52 by matthias