User Tools

Site Tools


evaluation:evaluate_indexing_statistics

Evaluate your indexing performance

Issue with performance evaluation

GrainSpotter provides information on indexing statistics in its log file. Things can become tricky, however, if you ran series of GrainSpotter indexings as described in the Advanced GrainSpotter indexing section.

If you merged the results of your indexings in a single log file, the number of experimental g-vectors assigned to your grains is the number of g-vectors listed in the log file.

The number of g-vectors that could have been assigned depends on

  • the number of g-vectors measured in the experiment,
  • the η, ω, and 2θ ranges defined in the GrainSpotter init file,
  • the 2θ, η, and ω tolerances as well as nσ in the GrainSpotter init file.

GrainSpotter does write this number out to the screen, but it depends on the init file. As your indexing loop starts, you have strict tolerances and ranges, hence, this number is lower than with looser tolerances. Later, once you use looser tolerances in GrainSpotter, already assigned g-vectors should have been removed from the original list. It is hence difficult to evaluate indexing performances.

Solution

The script timelessGSIndexingStatistics, part of the TIMEleSS tools is meant to help. You have to provide

  • The original g-vectors file,
  • The GrainSpotter init file with the loosest tolerances (typically, the last you used),
  • The merged grain file obtained with timelessGrainSpotterMerge, for instance,
  • The wavelength.

It will read the g-vectors file, remove g-vectors

  • that do not fall within the defined η, ω, and 2θ ranges,
  • that can not be from your sample, based on the list of theoretical g-vectors in the gve file as well as the 2θ tolerance and nσ in the GrainSpotter init file,

and calculate indexing statistics.

An example of output is shown below

timelessGSIndexingStatistics -i index-80.ini  -l merge-grains.log -g experimental.gve -w 0.3738

Parsed merge-grains.log, found 2960 grains
Parsed list of peaks from gve file experimental.gve, found 231612 peaks
Parsed grain spotter input file from index-80.ini

GrainSpotter results
        2960 grains indexed
        92842 peaks indexed
        31.4 peaks per grain in average

Peaks
        231612 g-vectors in GVE file
        134006 g-vectors within eta, omega, and 2theta ranges
        121293 g-vectors assigned to sample within these ranges

Indexing performance
        Out of 121293 possible g-vectors, 92842 have been assigned to 2960 grains
        28451 remaining g-vectors
        76.5 percents of g-vectors indexed

Usage

Here is the full help for timelessGSIndexingStatistics

timelessGSIndexingStatistics -h
Using AVX codes
usage: timelessGSIndexingStatistics -i gsinput -l logfilestem.log -g gve.gve -w wavelength

Reads a GrainSpotter input file, indexing log file, experimental g-vectors
from a GVE file, and pulls out indexing statistics. This is part of the
TIMEleSS project http://timeless.texture.rocks

optional arguments:
  -h, --help            show this help message and exit
  -i INPUTFILE, --inputfile INPUTFILE
                        Input file name for GrainSpotter. Use the file with
                        the looser conditions if you ran multiple steps of
                        GrainSpotter indexings. (required)
  -l LOGFILE, --logfile LOGFILE
                        File name of the indexing log file (required)
  -g GVE, --gve GVE     File name of the experimental g-vector file (required)
  -w WAVELENGTH, --wavelength WAVELENGTH
                        wavelength, in anstroms (required)
evaluation/evaluate_indexing_statistics.txt · Last modified: 2020/04/11 09:42 by smerkel