Common Parameters for fitallb, fitglobalgrain and fitgloball

Mandatory instructions 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

FitAllB far-field options

For running fitallb.py using only the far-field detector the following instructions might also be useful:
title anything to specify refinement, but remember quotes: 'my very special fitallb farfield refinement title'
structure_file name of file containing crystallographic information, possible formats: .cif or .pdf
sgno space group number. Onle needed a structure file is not given, and if the grain info is given as a res_file in stead of a log_file
stress convert strain to stress (0=no/1=yes), default: 0
c11,c12,c44,.. stiffness constants [Gpa], symmetry given by crystal_system will ensure setup of entire tensor from minimal set, which must be given for stress 1, defaults: None crystal_system required stiffness constants
isotropic c11,c12
cubic c11,c12,c44
hexagonal c11,c12,c13,c33,c44
trigonal_high c11,c12,c13,c14,c33,c44
trigonal_low c11,c12,c13,c14,c25,c33,c44
tetragonal_high c11,c12,c13,c33,c44,c66
tetragonal_low c11,c12,c13,c16,c33,c44,c66
orthorhombic c11,c12,c13,c22,c23,c33,c44,c55,c66
monoclinic c11,c12,c13,c15,c22,c23,c25,c33,c35,c44,c46,c55,c66
triclinic c11,c12,c13,c14,c15,c16,c22,c23,c24,c25,c26,c33,c34,c35,c36,c44,c45,c46,c55,c56,c66
xyz fit grain positions (0=no/1=yes), default: 1
rod fit orientations in Rodrigues representation (0=no/1=yes), default: 1
eps fit strain tensors (0=no/1=yes), default: 1
tol_grain tolerance for grain refinement, default: 1e-3
rej_ia outlier rejection limit [deg] for gvector misorientations, value in ]0;inf], default: 0.2 (undeformed material)
rej_vol outlier limit for volume/intensity based rejection, value in [3;inf], default: 5
rej_resmedian outlier limit for robust residual based rejection, value in [1;inf], default: 5
rej_resmean outlier rejection limit in terms of average residual, value in [3;inf], default: 10
rej_multi reject peaks assigned to multiple grains (0=no/1=yes), default: 1
overlap fraction of identical peaks assigned to grains before merging is considered, value in ]0;1], default: 1 (no merging)
min_refl minimum number of reflections to considered refinement meaningful, value in [1,inf], default: 9
skip skip refinement of the named grains from the grainspotter.log, values in {1,2,...}, default: None

Example input file: if10_res.inp

10 grains of IF steel simulated using PolyXSim within an illuminated volume of 0.7x0.7x0.01 mm with random orientations, grain sizes and Gaussian strains with a mean of 0 and a spread of 0.001.
The starting values of all grain parameters is read from the if10_near_rotpos.gff generated in the if10 near- and farfield refinement described below to show how resuming a refinement can be done.
Note that the grain positions are kept fixed in this farfield refinement as it can be assumed that the position in if10_near_rotpos.gff are better than what can be refined on a far-field detector.
Runtime approx.~40 sec per grain on a 2.2 GHzm 3.5 GB RAM PC

FitAllB near-field options

If near-field refinement of grain position should be performed in fitallb.py, the above far-field options can still be used, but xyz must be 0, near_xyz must be 1 and the following options must be added:

near_flt_file name of peaksearch.flt filtered peaks file from peaksearch containing near-field data
near_par_file name of detector.par file from ImageD11 containing near-field global parameters
near_bg average background level [counts] on near-field detector, value in ]0;2e16], default: 100
near_dety_size near-field detector dimension in y [pixels], default: 1536 (ESRF ID11 quantix)
near_detz_size near-field detector dimension in z [pixels], default: 1024
In addition the following commands may be useful:
near_xyz fit grain positions for near-field data (0=no/1=yes), default: 0
near_rod fit orientations in Rodrigues representation for near-field data (0=no/1=yes), default: 0
near_eps fit strain tensors for near-field data, 0=no only option
tol_rotpos tolerance for orientation and position refinement, default: 1e-2
near_rej_ia near-field outlier rejection limits same meaning and defaults as far-field counterparts
near_rej_vol
near_rej_resmedian
near_rej_resmean
near_rej_multi
near_overlap
near_min_refl minimum number of reflections to considered near_field refinement meaningful, value in [1,inf], default: 3

Example input file: if10.inp

Same data as for if10_res described above. The refinement is an example of using both near- and far-field data, and the runtime is approx.~1 min per grain on a 2.2 GHzm 3.5 GB RAM PC.