Common Parameters to set for fitallb, fitglobalgrain and fitglobal

The file must contain the following instructions, which are common for fitallb.py, fitglobalgrain.py and fitgloball.py: NB! Note that the order of the instructions is irrelevant and that extra comments can be added using #, see the example input files. NB! only one of log_file and res_file are needed. If both are given the information in res_file overrules that from log_file
log_file name of grainspotter.log from GrainSpotter containing indexing information
or
res_file name of .gff file from which to read starting grain parameters
flt_file name of peaksearch.flt from peaksearch containing filtered peaks information
par_file name of detector.par from ImageD11 containing information about experimental setup
w_step step size in omega [deg], value in ]0;inf[
w_limit limits of omega intervals [deg], order irrelevant but there must be an even number of limits, values in ]-180;180]
bg average background level [counts] on detector, value in ]0;2e16], default: 1000
dety_size detector dimension in y [pixels], default: 2048 (ESRF ID11 Frelon4M)
detz_size detector dimension in z [pixels], default: 2048
beampol_factor beam polarisation factor: 1 = fully plane polarised (default), 0 = unpolarised
beampol_direct direction of the normal to the plane of the primary beam polarisation with respect to the sample rotation axis [deg] e.g. if the omega rotation axis is parallel to the laboratory z-axis the value is 0.0 (default) and if the rotation is along the y-axis it is 90.0
crystal_system value in {isotropic, cubic, hexagonal, trigonal_high, trigonal_low, tetragonal_high, tetragonal_low, orthorhombic, monoclinic, triclinic} NB! isotropic simply means cubic with isotropic elasticity trigonal_high: 32, 3m, -3m trigonal_low: 3, -3 tetragonal_high: 422, 4mm, -42m, 4/mmm tetragonal_low: 4, -4, 4/m

Global parameter refinements

For running fitglobalgrain.py or fitgloball.py, to refine the global parameter of the far-field detector from an undeformed polycrystalline sample the following commands are mandatory:

Furthermore it must be specified which global parameters to refine:In addition the following optional commands can be used:
xyz 1 # refine positions
rod 1 # refine orientaions
eps 0 # do not refine strains, use undeformed material!
w fit omega stage tilt parameter wy (0=no/1=yes), default: 0
tilt fit detector tilt parameters tx, ty, tx (0=no/1=yes), default: 0
pixel fit pixel size py and pz (0=no/1=yes), default: 0
center fit detector centre along y-axis, cy (0=no/1=yes), default: 0
L fit sample-to-detector distance (0=no/1=yes), default: 0
title same use as stated earlier: 'my very special farfield global parameter fit'
structure_file name of file containing crystallographic information, possible formats: .cif or .pdf
res_file name of .gff file from which to read starting grain parameters (optional, NB! overrules information from log_file)
tol_rotpos tolerance for orientation and position refinement, default: 1e-2
tol_global tolerance for global parameter refinement, default: 1e-2
rej_ia outlier rejection limits, rej_multi and overlap same meaning and defaults as stated for fitallb.py
rej_vol
rej_resmedian
rej_resmean
rej_multi
overlap
min_refl minimum number of reflections to considered refinement meaningful, value in [1,inf], default: 9, but should be increased to around 80% of the expected average number of reflections
skip skip refinement of the named grains from the grainspotter.log, values in {1,2,...}, default: None

Example input files:

  1. fitglobal5_5.inp: refines 5 cycles of positions, orientations and global paramters starting from the global parameters in if100_globals_wedge.par and the grain position, orientations and assigned reflections of if100_globals_wedge_5.log.
  2. fitglobal5_res2.inp:This file resumes the refinement from the global parameters, fitglobal5_5_globals4_fab.par, and grains, fitglobal5_5_rotpos4.gff, obtained after the first 5 cycles to illustrate that more cycle can always be done later if it is judged that the refinement hasn't converged yet.

The above input files can be used for both fitglobalgrain.py and fitgloball.py.
The fit of the global parameters is performed for 5 grains of undeformed IF steel simulated within an illuminated volume of 0.7x0.7x0.01 mm with random orientations and grain sizes.
The input file of global parameters, if100_globals_wedge.par, has a slight offset in all of these as compared to the values used to simulate the diffraction images.
NB! Note that min_refl is set to 45 for the global parameter refinements while it was 36 for the strain refinement examples above that are performed for the same material and omega ranges.
This is done to only refine the global parameters from the largest and by assumption best determined grains.