### config file for LaueNeuralNetwork 
## comments
[CPU]
n_cpu = 16

[GLOBAL_DIRECTORY]
prefix = _final
## directory where all training related data and results will be saved 
main_directory = C:\Users\purushot\Desktop\pattern_matching\experimental\GUIv0\latest_version

[MATERIAL]
## same material key as lauetools (see Lauetools.dictlauetools.py for complete key)
## as of now symmetry can be cubic, hexagonal, orthorhombic, tetragonal, trigonal, monoclinic, triclinic

material = In2Bi
symmetry = hexagonal
space_group = 194
general_diffraction_rules = true

## if second phase is present, else none
material1 = In_epsilon
symmetry1 = tetragonal
space_group1 = 139
general_diffraction_rules1 = true

[DETECTOR]
## path to detector calibration file (.det)
## Max and Min energy to be used for generating training dataset, as well as for calcualting matching rate
detectorfile = C:\Users\purushot\Desktop\In_JSM\calib.det
emax = 21
emin = 5

[TRAINING]
## classes_with_frequency_to_remove: HKL class with less appearance than specified will be ignored in output
## desired_classes_output : can be all or an integer: to limit the number of output classes
## max_HKL_index : can be auto or integer: Maximum index of HKL to build output classes
## max_nb_grains : Maximum number of grains to simulate per lauepattern
####### Material 0
classes_with_frequency_to_remove = 500
desired_classes_output = all
max_HKL_index = 5
max_nb_grains = 1
####### Material 1
## HKL class with less appearance than specified will be ignored in output
classes_with_frequency_to_remove1 = 500
desired_classes_output1 = all
max_HKL_index1 = 5
max_nb_grains1 = 1

## Max number of simulations per number of grains
## Include single crystal misorientation (1 deg) data in training
## Maximum angular distance to probe (in deg)
## step size in angular distribution to discretize (in deg)
## batch size and epochs for training

max_simulations = 2000
include_small_misorientation = true
misorientation_angle = 1
angular_distance = 90
step_size = 0.1
batch_size = 50
epochs = 5

[PREDICTION]
# model_weight_file: if none, it will select by default the latest H5 weight file, else provide a specific model
# softmax_threshold_global: thresholding to limit the predicted spots search zone
# mr_threshold_global: thresholding to ignore all matricies less than the MR threshold
# cap_matchrate: any UB matrix providing MR less than this will be ignored
# coeff: should be same as cap_matchrate or no? (this is for try previous UB matrix)
# coeff_overlap: coefficient to limit the overlapping between spots; if more than this, new solution will be computed
# mode_spotCycle: How to cycle through predicted spots (slow or fast or multiorimat) ##slow is more thorough but slow as the name suggests
##use_previous true for few crystal and prefered texture case, otherwise time consuming; advised for single phase alone

UB_matrix_to_detect = 2
matrix_tolerance = 0.7
matrix_tolerance1 = 0.9
cap_matchrate = 0.10
material0_limit = 1
material1_limit = 1

### no need to change the settings below unless you know what you are doing
mode_spotCycle = graphmode
model_weight_file = none
softmax_threshold_global = 0.85
mr_threshold_global = 0.80
coeff = 0.3
coeff_overlap = 0.3
##true for few crystal and prefered texture case, otherwise time consuming; advised for single phase alone\n\
use_previous = true

[EXPERIMENT]
experiment_directory = C:\Users\purushot\Desktop\In_JSM\ech875_ROI01
experiment_file_prefix = ech875_ROI01_
image_grid_x = 51
image_grid_y = 51

[PEAKSEARCH]
intensity_threshold = 100
boxsize = 15
fit_peaks_gaussian = 1
FitPixelDev = 15
NumberMaxofFits = 3000

[STRAINCALCULATION]
strain_compute = false
tolerance_strain_refinement = 0.7,0.6,0.5,0.4,0.3,0.2
tolerance_strain_refinement1 = 0.7,0.6,0.5,0.4,0.3,0.2

[POSTPROCESS]
hkls_subsets = [1,1,0],[1,0,0],[1,1,1]

[CALLER]
residues_threshold=0.25
nb_spots_global_threshold=8
option_global = v2
use_om_user = true
nb_spots_consider = 100

[DEVELOPMENT]
# could be 1 or 2 or none in case of single phase
material_phase_always_present = none
write_MTEX_file = true
material0_lauegroup = 9
material1_lauegroup = 5

# Laue Groups
#group 1 -- triclinic: '-1'
#group 2 -- monoclinic: '2/m'
#group 3 -- orthorhombic: 'mmm'
#group 4 -- tetragonal: '4/m'
#group 5 -- tetragonal: '4/mmm'
#group 6 -- trigonal: '-3'
#group 7 -- trigonal: '-3m'
#group 8 -- hexagonal: '6/m'
#group 9 -- hexagonal: '6/mmm'
#group 10 -- cubic: 'm3'
#group 11 -- cubic: 'm3m'