Basics of Laue Pattern peak search and Unit cell Refinement¶
This Notebook is a part of Tutorials on LaueTools Suite.¶
Author: J.-S. Micha
Last Revision: August 2019
tested with python3
Objectives
- Load and display Laue pattern images
- Perform a Peak Search
- Perform the indexation of a Laue spots list
- Perform the crystal orientation and unit cell refinement
Setting absolute path to LaueTools Modules if Lauetools has not been installed with pip. It is assumed that this notebook is located in a subfolder (normally Notebooks)
abspathLaueTools /home/micha/LaueToolsPy3/LaueTools
'/home/micha/LaueToolsPy3/LaueTools/__init__.py'
LaueToolsProjectFolder /home/micha/LaueToolsPy3/LaueTools
/home/micha/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters
module Image / PIL is not installed
Cython compiled module 'gaussian2D' for fast computation is not installed!
module Image / PIL is not installed
Considering single image analysis (that belong to the LaueTools distribution)
Considering analysis of one image in dataset
For information: select image file of interest, in case of set of images with index. Then, splitting imagefilename allows to loop over images: prefix+index.extension
Read image file, get data and display it
Function readCCDimage()
returns dataimage
as a 2D numpy array
with the proper dimensions and orientation given by framedim
and the
geometrical transformations labelled by fliprot
Displaying Ge_blanc_0000.mccd
nb elements 4194304
framedim (2048, 2048)
framedim nb of elements 4194304
<IPython.core.display.Javascript object>
Text(0.5,1,'Ge_blanc_0000.mccd')
*peaksearch* is performed in two main steps: - 1) blobs or local maxima finder - 2) for blob, refinement starting from blob average center.
For the first step, readCCDimage()
is called to obtain raw data if
no different data array is provided with the argument
Data_for_localMaxima
(set to None
by default). After second
step, Peaksearch results can be purged from peaks already present in a
file as an optional argument Remove_BlackListedPeaks_fromfile
.
CCDLabel: MARCCD165 nb of pixels (4194304,) nb elements 4194304 framedim (2048, 2048) framedim nb of elements 4194304 image from filename ../LaueImages/Ge_blanc_0000.mccd read! Read Image. Execution time : 0.006 seconds Data.shape for local maxima (2048, 2048) Using simple intensity thresholding to detect local maxima (method 1/3) len(peaklist) 82 Local maxima search. Execution time : 0.336 seconds Keep 82 from 82 initial peaks (ready for peak positions and shape fitting) ************* 82 local maxima found Fitting of each local maxima addImax False nb elements 4194304 framedim (2048, 2048) framedim nb of elements 4194304 framedim in readoneimage_manycrops (2048, 2048) fitting time for 82 peaks is : 0.2039 nb of results: 82 After fitting, 0/82 peaks have been rejected due to (final - initial position)> FitPixelDev = 10 0 spots have been rejected due to negative baseline 0 spots have been rejected due to much intensity 0 spots have been rejected due to weak intensity 0 spots have been rejected due to small peak size 0 spots have been rejected due to large peak size ToTake {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81} len(ToTake) 82 82 fitted peak(s) Removing duplicates from fit 82 peaks found after removing duplicates (minimum intermaxima distance = 5) peak search time 0.5514366626739502
Spots properties:
peak_X, peak_Y, peak_I, peak_fwaxmaj, peak_fwaxmin, peak_inclination, Xdev, Ydev, peak_bkg, Ipixmax,
Spots are sorted by intensity (according to the 2D gaussian fit)
Digital Spots properties for the 5 most intense spots
[[ 6.231334887002143e+02 1.657728161614024e+03 2.979937967247360e+04
8.515577956136006e-01 7.511212178165599e-01 1.820409415704489e+01
1.334887002143432e-01 -2.718383859764799e-01 2.966046444454810e+02
2.000000000000000e+02]
[ 1.244326205473488e+03 1.662150473603958e+03 2.242563070589073e+04
6.977180389301006e-01 6.390759549880105e-01 1.293529253564775e+02
3.262054734875619e-01 1.504736039580621e-01 1.998717405717028e+02
2.000000000000000e+02]
[ 9.330365915823824e+02 1.215440948340315e+03 2.219753607623998e+04
7.846021988134166e-01 7.862341648303387e-01 3.246533552343026e+02
3.659158238235705e-02 4.409483403153445e-01 2.110241433113940e+02
2.000000000000000e+02]
[ 5.852254505694141e+02 5.887990375606668e+02 9.528825561251553e+03
7.791458064142315e-01 7.399755695034808e-01 1.068330480796285e+02
2.254505694140789e-01 -2.009624393332388e-01 1.501265419627265e+02
2.000000000000000e+02]
[ 1.276607259246803e+03 6.002998208781320e+02 9.153971543092421e+03
8.153699693677648e-01 8.035243472697837e-01 8.044575533084571e+01
-3.927407531973586e-01 2.998208781319818e-01 1.324821469609317e+02
2.000000000000000e+02]
[ 9.326643784727646e+02 7.500763813513167e+02 6.940078500922347e+03
7.065049204848781e-01 7.482895847319173e-01 8.063512928783894e+00
-3.356215272353893e-01 7.638135131674062e-02 1.317606341369902e+02
2.000000000000000e+02]]
X, Y pixel refinement positions for the first 5 spots
array([[ 623.1334887002143, 1657.7281616140235],
[1244.3262054734876, 1662.150473603958 ],
[ 933.0365915823824, 1215.4409483403153],
[ 585.2254505694141, 588.7990375606668],
[1276.6072592468026, 600.299820878132 ]])
add markers to image
<IPython.core.display.Javascript object>
List of peaks props is written in a file with extension .dat, here the variable is ``datfilename``
peaklist.shape (82, 10)
fullpathimagefile ../LaueImages/Ge_blanc_0000.mccd
imagefolder ../LaueImages
table of 82 peak(s) with 10 columns has been written in
/home/micha/LaueToolsPy3/LaueTools/LaueImages/Ge_blanc_0000Notebook.dat
Now indexing¶
geometry calibration parameters¶
Either you fill manually the dict of parameters or you read a file .det
reading geometry calibration file
calib = [ 7.07760e+01 9.41760e+02 1.08244e+03 6.29000e-01 -6.85000e-01
7.91400e-02 2.04800e+03 2.04800e+03]
matrix = [ 0.995829 -0.071471 -0.056709 0.012247 0.720654 -0.693187 0.09041
0.689602 0.718523]
creation of a .cor file containing accurate scattering angles thanks to detector geometry parameters
Only list of spots with scattering angles can be indexed. In LaueTools .dat file contains only X, Y pixel positions, .cor file contains in addition 2theta and chi scattering angles, and .fit file in addition indexed results properties (such as h, k, l, energy, grain index …)
Entering CrystalParameters **---*********************** nb of spots and columns in .dat file (82, 3) file :../LaueImages/Ge_blanc_0000Notebook.dat containing 82 peaks (2theta chi X Y I) written in ../LaueImages/Ge_blanc_0000Notebook.cor
create instance of an objet spotsset class¶
Cython compiled module for fast computation of Laue spots is not installed!
Cython compiled 'angulardist' module for fast computation of angular distance is not installed!
Using default module
Cython compiled module for fast computation of angular distance is not installed!
module Image / PIL is not installed
CCDcalib in readfile_cor {'dd': 70.776, 'xcen': 941.76, 'ycen': 1082.44, 'xbet': 0.629, 'xgam': -0.685, 'xpixelsize': 0.07914, 'ypixelsize': 0.07914, 'CCDLabel': 'MARCCD165', 'framedim': [2048.0, 2048.0], 'detectordiameter': 162.07872, 'kf_direction': 'Z>0', 'pixelsize': 0.07914}
CCD Detector parameters read from .cor file
CCDcalibdict {'dd': 70.776, 'xcen': 941.76, 'ycen': 1082.44, 'xbet': 0.629, 'xgam': -0.685, 'xpixelsize': 0.07914, 'ypixelsize': 0.07914, 'CCDLabel': 'MARCCD165', 'framedim': [2048.0, 2048.0], 'detectordiameter': 162.07872, 'kf_direction': 'Z>0', 'pixelsize': 0.07914}
True
array([[ 0.0000000e+00, 5.8426915e+01, 2.0130035e+01, 6.2313000e+02,
1.6577300e+03, 2.9799380e+04],
[ 1.0000000e+00, 5.7634672e+01, -1.8415523e+01, 1.2443300e+03,
1.6621500e+03, 2.2425630e+04],
[ 2.0000000e+00, 8.0919846e+01, 6.6158100e-01, 9.3304000e+02,
1.2154400e+03, 2.2197540e+04]])
*Set parameters for indexation: Ge, maximum energy*
All materials are listed in dict_LaueTools.py in dict_Materials. You can edit/modify the module (then a restart of the kernel is necessary)
Before launching the indexation procedure you may want to check a solution found elsewhere or sometimes ago. Then fill ``previousResults`` as shown below
Then launch indexation by specifying some arguments of the method ``IndexSpotsSet``:
- nbGrainstoFind: nb of grains of this material you want to find
- set_central_spots_hkl: imposed miller indices [h,k,l] of central spots (set A of spots) else : None
...
CCDcalib in readfile_cor {'dd': 70.776, 'xcen': 941.76, 'ycen': 1082.44, 'xbet': 0.629, 'xgam': -0.685, 'xpixelsize': 0.07914, 'ypixelsize': 0.07914, 'CCDLabel': 'MARCCD165', 'framedim': [2048.0, 2048.0], 'detectordiameter': 162.07872, 'kf_direction': 'Z>0', 'pixelsize': 0.07914} CCD Detector parameters read from .cor file CCDcalibdict {'dd': 70.776, 'xcen': 941.76, 'ycen': 1082.44, 'xbet': 0.629, 'xgam': -0.685, 'xpixelsize': 0.07914, 'ypixelsize': 0.07914, 'CCDLabel': 'MARCCD165', 'framedim': [2048.0, 2048.0], 'detectordiameter': 162.07872, 'kf_direction': 'Z>0', 'pixelsize': 0.07914} self.pixelsize in IndexSpotsSet 0.07914 ResolutionAngstromLUT in IndexSpotsSet False Remaining nb of spots to index for grain #0 : 82 ** start to index grain #0 of Material: Ge ** providing new set of matrices Using Angles LUT template matching nbspots 82 NBMAXPROBED 10 nbspots 82 set_central_spots_hkl [0, 1, 1] Central set of exp. spotDistances from spot_index_central_list probed self.absolute_index [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81] spot_index_central_list [0, 1, 2, 3, 4] [0 1 2 3 4] LUT is None when entering getOrientMatrices() set_central_spots_hkl [0, 1, 1] set_central_spots_hkl is not None in getOrientMatrices() set_central_spots_hkl [0 1 1] set_central_spots_hkl.shape (3,) case: 1a set_central_spots_hkl_list [[0 1 1] [0 1 1] [0 1 1] [0 1 1] [0 1 1]] cubicSymmetry True LUT_tol_angle 0.5 ---***------------------------------------------------* Calculating all possible matrices from exp spot #0 and the 9 other(s) hkl in getOrientMatrices [0 1 1] <class 'numpy.ndarray'> using LUTspecific LUTspecific is None for k_centspot_index 0 in getOrientMatrices() hkl1 in matrices_from_onespot_hkl() [0 1 1] Computing hkl2 list for specific or cubic LUT in matrices_from_onespot_hkl() Calculating LUT in PlanePairs_from2sets() Looking up planes pairs in LUT from exp. spots (0, 2): Looking up planes pairs in LUT from exp. spots (0, 6): Looking up planes pairs in LUT from exp. spots (0, 9): calculating matching rates of solutions for exp. spots [0, 2] calculating matching rates of solutions for exp. spots [0, 6] calculating matching rates of solutions for exp. spots [0, 9] ---***------------------------------------------------* Calculating all possible matrices from exp spot #1 and the 9 other(s) hkl in getOrientMatrices [0 1 1] <class 'numpy.ndarray'> using LUTspecific LUTspecific is not None for k_centspot_index 1 in getOrientMatrices() hkl1 in matrices_from_onespot_hkl() [0 1 1] Using specific LUT in matrices_from_onespot_hkl() Looking up planes pairs in LUT from exp. spots (1, 2): Looking up planes pairs in LUT from exp. spots (1, 7): Looking up planes pairs in LUT from exp. spots (1, 9): calculating matching rates of solutions for exp. spots [1, 2] calculating matching rates of solutions for exp. spots [1, 7] calculating matching rates of solutions for exp. spots [1, 9] ---***------------------------------------------------* Calculating all possible matrices from exp spot #2 and the 9 other(s) hkl in getOrientMatrices [0 1 1] <class 'numpy.ndarray'> using LUTspecific LUTspecific is not None for k_centspot_index 2 in getOrientMatrices() hkl1 in matrices_from_onespot_hkl() [0 1 1] Using specific LUT in matrices_from_onespot_hkl() Looking up planes pairs in LUT from exp. spots (2, 0): Looking up planes pairs in LUT from exp. spots (2, 1): Looking up planes pairs in LUT from exp. spots (2, 9): calculating matching rates of solutions for exp. spots [2, 0] calculating matching rates of solutions for exp. spots [2, 1] calculating matching rates of solutions for exp. spots [2, 9] ---***------------------------------------------------* Calculating all possible matrices from exp spot #3 and the 9 other(s) hkl in getOrientMatrices [0 1 1] <class 'numpy.ndarray'> using LUTspecific LUTspecific is not None for k_centspot_index 3 in getOrientMatrices() hkl1 in matrices_from_onespot_hkl() [0 1 1] Using specific LUT in matrices_from_onespot_hkl() Looking up planes pairs in LUT from exp. spots (3, 7): Looking up planes pairs in LUT from exp. spots (3, 8): Looking up planes pairs in LUT from exp. spots (3, 9): calculating matching rates of solutions for exp. spots [3, 7] calculating matching rates of solutions for exp. spots [3, 8] calculating matching rates of solutions for exp. spots [3, 9] ---***------------------------------------------------* Calculating all possible matrices from exp spot #4 and the 9 other(s) hkl in getOrientMatrices [0 1 1] <class 'numpy.ndarray'> using LUTspecific LUTspecific is not None for k_centspot_index 4 in getOrientMatrices() hkl1 in matrices_from_onespot_hkl() [0 1 1] Using specific LUT in matrices_from_onespot_hkl() Looking up planes pairs in LUT from exp. spots (4, 6): Looking up planes pairs in LUT from exp. spots (4, 8): Looking up planes pairs in LUT from exp. spots (4, 9): calculating matching rates of solutions for exp. spots [4, 6] calculating matching rates of solutions for exp. spots [4, 8] calculating matching rates of solutions for exp. spots [4, 9] ----------------------------------------- results: matrix: matching results [ 0.071442298339536 -0.056791122889477 -0.995826674863109] res: [94.0, 135.0] 0.005 69.63 [-0.720597705663885 -0.693247631822884 -0.012110638459969] spot indices [0 9] [-0.689608632382347 0.718518569419943 -0.090393581312322] planes [[-2.0, 1.0, 1.0], [0.0, 1.0, 1.0]] [ 0.071284911945937 -0.056791915954001 -0.995837908301915] res: [93.0, 134.0] 0.006 69.40 [-0.720581964957976 -0.693265307713712 -0.012035152592104] spot indices [1 9] [-0.68968586701208 0.718453369664079 -0.09032253573791 ] planes [[-1.0, 2.0, 1.0], [0.0, 1.0, 1.0]] [-0.071331310042019 -0.995834915200135 -0.056786141584281] res: [93.0, 134.0] 0.005 69.40 [ 0.720561755804718 -0.012058289359476 -0.693285910522741] spot indices [2 9] [ 0.689652960030445 -0.090345399841628 0.718482082900264] planes [[1.0, 1.0, 1.0], [0.0, 1.0, 1.0]] [-0.071391558888759 -0.995830258190095 -0.056792096214888] res: [94.0, 135.0] 0.006 69.63 [ 0.720671448854468 -0.012140732995851 -0.693170444701969] spot indices [3 9] [ 0.689588625514858 -0.090412962995124 0.718535332243983] planes [[2.0, 3.0, 1.0], [0.0, 1.0, 1.0]] [ 0.071340651481789 -0.056823338834159 -0.995832124210648] res: [94.0, 135.0] 0.005 69.63 [-0.720605825766681 -0.693235936569283 -0.012295532523216] spot indices [4 9] [-0.689563524109094 0.718557247109645 -0.090430242974657] planes [[-1.0, 2.0, 3.0], [0.0, 1.0, 1.0]] Number of matrices found (nb_sol): 5 set_central_spots_hkl in FindOrientMatrices [0, 1, 1] Merging matrices keep_only_equivalent = False sorting according to rank rank [0 4 3 2 1] ----------------------------------------- results: matrix: matching results [ 0.071442298339536 -0.056791122889477 -0.995826674863109] res: [ 94. 135.] 0.005 69.63 [-0.720597705663885 -0.693247631822884 -0.012110638459969] [-0.689608632382347 0.718518569419943 -0.090393581312322] [ 0.071340651481789 -0.056823338834159 -0.995832124210648] res: [ 94. 135.] 0.005 69.63 [-0.720605825766681 -0.693235936569283 -0.012295532523216] [-0.689563524109094 0.718557247109645 -0.090430242974657] [-0.071391558888759 -0.995830258190095 -0.056792096214888] res: [ 94. 135.] 0.006 69.63 [ 0.720671448854468 -0.012140732995851 -0.693170444701969] [ 0.689588625514858 -0.090412962995124 0.718535332243983] [-0.071331310042019 -0.995834915200135 -0.056786141584281] res: [ 93. 134.] 0.005 69.40 [ 0.720561755804718 -0.012058289359476 -0.693285910522741] [ 0.689652960030445 -0.090345399841628 0.718482082900264] [ 0.071284911945937 -0.056791915954001 -0.995837908301915] res: [ 93. 134.] 0.006 69.40 [-0.720581964957976 -0.693265307713712 -0.012035152592104] [-0.68968586701208 0.718453369664079 -0.09032253573791 ] Nb of potential orientation matrice(s) UB found: 5 [[[ 0.071442298339536 -0.056791122889477 -0.995826674863109] [-0.720597705663885 -0.693247631822884 -0.012110638459969] [-0.689608632382347 0.718518569419943 -0.090393581312322]] [[ 0.071340651481789 -0.056823338834159 -0.995832124210648] [-0.720605825766681 -0.693235936569283 -0.012295532523216] [-0.689563524109094 0.718557247109645 -0.090430242974657]] [[-0.071391558888759 -0.995830258190095 -0.056792096214888] [ 0.720671448854468 -0.012140732995851 -0.693170444701969] [ 0.689588625514858 -0.090412962995124 0.718535332243983]] [[-0.071331310042019 -0.995834915200135 -0.056786141584281] [ 0.720561755804718 -0.012058289359476 -0.693285910522741] [ 0.689652960030445 -0.090345399841628 0.718482082900264]] [[ 0.071284911945937 -0.056791915954001 -0.995837908301915] [-0.720581964957976 -0.693265307713712 -0.012035152592104] [-0.68968586701208 0.718453369664079 -0.09032253573791 ]]] Nb of potential UBs 5 Working with a new stack of orientation matrices MATCHINGRATE_THRESHOLD_IAL= 100.0 has not been reached! All potential solutions have been calculated taking the first one only. bestUB object <LaueTools.indexingSpotsSet.OrientMatrix object at 0x7f7c954f5e80> ---------------refining grain orientation and strain #0----------------- refining grain #0 step -----0 bestUB <LaueTools.indexingSpotsSet.OrientMatrix object at 0x7f7c954f5e80> True it is an OrientMatrix object Orientation <LaueTools.indexingSpotsSet.OrientMatrix object at 0x7f7c954f5e80> matrix [[-0.071391558888759 -0.995830258190095 -0.056792096214888] [ 0.720671448854468 -0.012140732995851 -0.693170444701969] [ 0.689588625514858 -0.090412962995124 0.718535332243983]] *nb of selected spots in AssignHKL*** 82 UBOrientMatrix [[-0.071391558888759 -0.995830258190095 -0.056792096214888] [ 0.720671448854468 -0.012140732995851 -0.693170444701969] [ 0.689588625514858 -0.090412962995124 0.718535332243983]] For angular tolerance 0.50 deg Nb of pairs found / nb total of expected spots: 81/147 Matching Rate : 55.10 Nb missing reflections: 66 grain #0 : 81 links to simulated spots have been found *********mean pixel deviation 0.2522039400422887 ****** Initial residues [0.191356096913678 0.158479888122211 0.125984922997516 0.007464331088751 0.220920883122328 0.065197410024489 0.405464259132319 0.079769518806149 0.309835172580193 0.024815180122634 0.146635771529913 0.197926454567734 0.253815574123594 0.241517985294699 0.301875442673439 0.217498144625921 0.186026257638361 0.152430964466482 0.022468745875909 0.372498387808433 0.225884815274198 0.155682523936061 0.308213213363587 0.354423361607117 0.237793437184287 0.344146246502948 0.117700835663451 0.22732103372742 0.263538267437741 0.133994037769124 0.091015982918167 0.367309714380722 0.359174426753832 0.281533512444384 0.191021625928391 0.219461033259323 0.371983339466526 0.3512796731268 0.298580209240117 0.447936020775024 0.160438308161376 0.631208433750478 0.420060120050684 0.195238104695171 0.051118832992816 0.159003375870547 0.354123955360538 0.049380652521924 0.301744705672337 0.127112320459672 0.082920786835417 0.19281838475986 0.130182524243209 0.332360152782496 0.533160923855596 0.276782907418236 0.125265672564509 0.184320173657227 0.238789408490181 0.149666955002009 0.473603697641706 0.235878500572685 0.425250385266374 0.445829965130009 0.255853120078437 0.271987274130697 0.298711159306184 0.310382741777609 0.228936459666657 0.374245425300233 0.100039587285176 0.096572087547537 0.196098380129156 0.140612883827292 0.338936919946618 0.526244208385607 0.190627233723994 0.629487817359844 0.233333060530866 0.316852495355672 0.61336433904477 ] --------------------------------------------------- *********************** first error with initial values of: ['b/a', 'c/a', 'a12', 'a13', 'a23', 'theta1', 'theta2', 'theta3'] *********************** *********mean pixel deviation 0.2522039400422887 ****** *********************** Fitting parameters: ['b/a', 'c/a', 'a12', 'a13', 'a23', 'theta1', 'theta2', 'theta3'] *********************** With initial values [1. 1. 0. 0. 0. 0. 0. 0.] code results 1 nb iterations 189 mesg Both actual and predicted relative reductions in the sum of squares are at most 0.000000 strain_sol [ 9.999862096544356e-01 9.999941276097474e-01 -7.144700897145182e-06 5.728542645493929e-05 1.242229382006964e-05 2.977984275077042e-05 -1.953472667313407e-03 6.919002586889341e-03] ********** End of Fitting - Final errors ************** *********mean pixel deviation 0.18215488925149526 ****** devstrain, lattice_parameter_direct_strain [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] [ 5.657509728355469 5.657578574250457 5.657522951317707 90.0010541881893 90.00328909016345 89.99939828842365 ] For comparison: a,b,c are rescaled with respect to the reference value of a = 5.657500 Angstroms lattice_parameter_direct_strain [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] devstrain1, lattice_parameter_direct_strain1 [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] new UBs matrix in q= UBs G (s for strain) strain_direct [[ 1.719550237533340e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 1.388845576189013e-05 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 3.998638790081444e-06]] deviatoric strain [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] new UBs matrix in q= UBs G (s for strain) strain_direct [[ 1.719550237533340e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 1.388845576189013e-05 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 3.998638790081444e-06]] deviatoric strain [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] For comparison: a,b,c are rescaled with respect to the reference value of a = 5.657500 Angstroms lattice_parameter_direct_strain [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] final lattice_parameters [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] UB and strain refinement completed True it is an OrientMatrix object Orientation <LaueTools.indexingSpotsSet.OrientMatrix object at 0x7f7c851edeb8> matrix [[-0.071478224945242 -0.995814588672313 -0.056724144676328] [ 0.720639310822985 -0.012262885888099 -0.693156594892675] [ 0.689613233174427 -0.090416539541802 0.718545890295648]] *nb of selected spots in AssignHKL*** 82 UBOrientMatrix [[-0.071478224945242 -0.995814588672313 -0.056724144676328] [ 0.720639310822985 -0.012262885888099 -0.693156594892675] [ 0.689613233174427 -0.090416539541802 0.718545890295648]] For angular tolerance 0.50 deg Nb of pairs found / nb total of expected spots: 81/147 Matching Rate : 55.10 Nb missing reflections: 66 grain #0 : 81 links to simulated spots have been found GoodRefinement condition is True nb_updates 81 compared to 6 refining grain #0 step -----1 bestUB <LaueTools.indexingSpotsSet.OrientMatrix object at 0x7f7c954f5e80> True it is an OrientMatrix object Orientation <LaueTools.indexingSpotsSet.OrientMatrix object at 0x7f7c954f5e80> matrix [[-0.071391558888759 -0.995830258190095 -0.056792096214888] [ 0.720671448854468 -0.012140732995851 -0.693170444701969] [ 0.689588625514858 -0.090412962995124 0.718535332243983]] *nb of selected spots in AssignHKL*** 82 UBOrientMatrix [[-0.071391558888759 -0.995830258190095 -0.056792096214888] [ 0.720671448854468 -0.012140732995851 -0.693170444701969] [ 0.689588625514858 -0.090412962995124 0.718535332243983]] For angular tolerance 0.20 deg Nb of pairs found / nb total of expected spots: 81/147 Matching Rate : 55.10 Nb missing reflections: 66 grain #0 : 81 links to simulated spots have been found *********mean pixel deviation 0.2522039400422887 ****** Initial residues [0.191356096913678 0.158479888122211 0.125984922997516 0.007464331088751 0.220920883122328 0.065197410024489 0.405464259132319 0.079769518806149 0.309835172580193 0.024815180122634 0.146635771529913 0.197926454567734 0.253815574123594 0.241517985294699 0.301875442673439 0.217498144625921 0.186026257638361 0.152430964466482 0.022468745875909 0.372498387808433 0.225884815274198 0.155682523936061 0.308213213363587 0.354423361607117 0.237793437184287 0.344146246502948 0.117700835663451 0.22732103372742 0.263538267437741 0.133994037769124 0.091015982918167 0.367309714380722 0.359174426753832 0.281533512444384 0.191021625928391 0.219461033259323 0.371983339466526 0.3512796731268 0.298580209240117 0.447936020775024 0.160438308161376 0.631208433750478 0.420060120050684 0.195238104695171 0.051118832992816 0.159003375870547 0.354123955360538 0.049380652521924 0.301744705672337 0.127112320459672 0.082920786835417 0.19281838475986 0.130182524243209 0.332360152782496 0.533160923855596 0.276782907418236 0.125265672564509 0.184320173657227 0.238789408490181 0.149666955002009 0.473603697641706 0.235878500572685 0.425250385266374 0.445829965130009 0.255853120078437 0.271987274130697 0.298711159306184 0.310382741777609 0.228936459666657 0.374245425300233 0.100039587285176 0.096572087547537 0.196098380129156 0.140612883827292 0.338936919946618 0.526244208385607 0.190627233723994 0.629487817359844 0.233333060530866 0.316852495355672 0.61336433904477 ] --------------------------------------------------- *********************** first error with initial values of: ['b/a', 'c/a', 'a12', 'a13', 'a23', 'theta1', 'theta2', 'theta3'] *********************** *********mean pixel deviation 0.2522039400422887 ****** *********************** Fitting parameters: ['b/a', 'c/a', 'a12', 'a13', 'a23', 'theta1', 'theta2', 'theta3'] *********************** With initial values [1. 1. 0. 0. 0. 0. 0. 0.] code results 1 nb iterations 189 mesg Both actual and predicted relative reductions in the sum of squares are at most 0.000000 strain_sol [ 9.999862096544356e-01 9.999941276097474e-01 -7.144700897145182e-06 5.728542645493929e-05 1.242229382006964e-05 2.977984275077042e-05 -1.953472667313407e-03 6.919002586889341e-03] ********** End of Fitting - Final errors ************** *********mean pixel deviation 0.18215488925149526 ****** devstrain, lattice_parameter_direct_strain [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] [ 5.657509728355469 5.657578574250457 5.657522951317707 90.0010541881893 90.00328909016345 89.99939828842365 ] For comparison: a,b,c are rescaled with respect to the reference value of a = 5.657500 Angstroms lattice_parameter_direct_strain [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] devstrain1, lattice_parameter_direct_strain1 [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] new UBs matrix in q= UBs G (s for strain) strain_direct [[ 1.719550237533340e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 1.388845576189013e-05 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 3.998638790081444e-06]] deviatoric strain [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] new UBs matrix in q= UBs G (s for strain) strain_direct [[ 1.719550237533340e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 1.388845576189013e-05 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 3.998638790081444e-06]] deviatoric strain [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] For comparison: a,b,c are rescaled with respect to the reference value of a = 5.657500 Angstroms lattice_parameter_direct_strain [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] final lattice_parameters [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] UB and strain refinement completed True it is an OrientMatrix object Orientation <LaueTools.indexingSpotsSet.OrientMatrix object at 0x7f7c84338898> matrix [[-0.071478224945242 -0.995814588672313 -0.056724144676328] [ 0.720639310822985 -0.012262885888099 -0.693156594892675] [ 0.689613233174427 -0.090416539541802 0.718545890295648]] *nb of selected spots in AssignHKL*** 82 UBOrientMatrix [[-0.071478224945242 -0.995814588672313 -0.056724144676328] [ 0.720639310822985 -0.012262885888099 -0.693156594892675] [ 0.689613233174427 -0.090416539541802 0.718545890295648]] For angular tolerance 0.20 deg Nb of pairs found / nb total of expected spots: 81/147 Matching Rate : 55.10 Nb missing reflections: 66 grain #0 : 81 links to simulated spots have been found GoodRefinement condition is True nb_updates 81 compared to 6 refining grain #0 step -----2 bestUB <LaueTools.indexingSpotsSet.OrientMatrix object at 0x7f7c954f5e80> True it is an OrientMatrix object Orientation <LaueTools.indexingSpotsSet.OrientMatrix object at 0x7f7c954f5e80> matrix [[-0.071391558888759 -0.995830258190095 -0.056792096214888] [ 0.720671448854468 -0.012140732995851 -0.693170444701969] [ 0.689588625514858 -0.090412962995124 0.718535332243983]] *nb of selected spots in AssignHKL*** 82 UBOrientMatrix [[-0.071391558888759 -0.995830258190095 -0.056792096214888] [ 0.720671448854468 -0.012140732995851 -0.693170444701969] [ 0.689588625514858 -0.090412962995124 0.718535332243983]] For angular tolerance 0.10 deg Nb of pairs found / nb total of expected spots: 81/147 Matching Rate : 55.10 Nb missing reflections: 66 grain #0 : 81 links to simulated spots have been found *********mean pixel deviation 0.2522039400422887 ****** Initial residues [0.191356096913678 0.158479888122211 0.125984922997516 0.007464331088751 0.220920883122328 0.065197410024489 0.405464259132319 0.079769518806149 0.309835172580193 0.024815180122634 0.146635771529913 0.197926454567734 0.253815574123594 0.241517985294699 0.301875442673439 0.217498144625921 0.186026257638361 0.152430964466482 0.022468745875909 0.372498387808433 0.225884815274198 0.155682523936061 0.308213213363587 0.354423361607117 0.237793437184287 0.344146246502948 0.117700835663451 0.22732103372742 0.263538267437741 0.133994037769124 0.091015982918167 0.367309714380722 0.359174426753832 0.281533512444384 0.191021625928391 0.219461033259323 0.371983339466526 0.3512796731268 0.298580209240117 0.447936020775024 0.160438308161376 0.631208433750478 0.420060120050684 0.195238104695171 0.051118832992816 0.159003375870547 0.354123955360538 0.049380652521924 0.301744705672337 0.127112320459672 0.082920786835417 0.19281838475986 0.130182524243209 0.332360152782496 0.533160923855596 0.276782907418236 0.125265672564509 0.184320173657227 0.238789408490181 0.149666955002009 0.473603697641706 0.235878500572685 0.425250385266374 0.445829965130009 0.255853120078437 0.271987274130697 0.298711159306184 0.310382741777609 0.228936459666657 0.374245425300233 0.100039587285176 0.096572087547537 0.196098380129156 0.140612883827292 0.338936919946618 0.526244208385607 0.190627233723994 0.629487817359844 0.233333060530866 0.316852495355672 0.61336433904477 ] --------------------------------------------------- *********************** first error with initial values of: ['b/a', 'c/a', 'a12', 'a13', 'a23', 'theta1', 'theta2', 'theta3'] *********************** *********mean pixel deviation 0.2522039400422887 ****** *********************** Fitting parameters: ['b/a', 'c/a', 'a12', 'a13', 'a23', 'theta1', 'theta2', 'theta3'] *********************** With initial values [1. 1. 0. 0. 0. 0. 0. 0.] code results 1 nb iterations 189 mesg Both actual and predicted relative reductions in the sum of squares are at most 0.000000 strain_sol [ 9.999862096544356e-01 9.999941276097474e-01 -7.144700897145182e-06 5.728542645493929e-05 1.242229382006964e-05 2.977984275077042e-05 -1.953472667313407e-03 6.919002586889341e-03] ********** End of Fitting - Final errors ************** *********mean pixel deviation 0.18215488925149526 ****** devstrain, lattice_parameter_direct_strain [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] [ 5.657509728355469 5.657578574250457 5.657522951317707 90.0010541881893 90.00328909016345 89.99939828842365 ] For comparison: a,b,c are rescaled with respect to the reference value of a = 5.657500 Angstroms lattice_parameter_direct_strain [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] devstrain1, lattice_parameter_direct_strain1 [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] new UBs matrix in q= UBs G (s for strain) strain_direct [[ 1.719550237533340e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 1.388845576189013e-05 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 3.998638790081444e-06]] deviatoric strain [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] new UBs matrix in q= UBs G (s for strain) strain_direct [[ 1.719550237533340e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 1.388845576189013e-05 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 3.998638790081444e-06]] deviatoric strain [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] For comparison: a,b,c are rescaled with respect to the reference value of a = 5.657500 Angstroms lattice_parameter_direct_strain [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] final lattice_parameters [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] UB and strain refinement completed True it is an OrientMatrix object Orientation <LaueTools.indexingSpotsSet.OrientMatrix object at 0x7f7c94485da0> matrix [[-0.071478224945242 -0.995814588672313 -0.056724144676328] [ 0.720639310822985 -0.012262885888099 -0.693156594892675] [ 0.689613233174427 -0.090416539541802 0.718545890295648]] *nb of selected spots in AssignHKL*** 81 UBOrientMatrix [[-0.071478224945242 -0.995814588672313 -0.056724144676328] [ 0.720639310822985 -0.012262885888099 -0.693156594892675] [ 0.689613233174427 -0.090416539541802 0.718545890295648]] For angular tolerance 0.10 deg Nb of pairs found / nb total of expected spots: 81/147 Matching Rate : 55.10 Nb missing reflections: 66 grain #0 : 81 links to simulated spots have been found GoodRefinement condition is True nb_updates 81 compared to 6 --------------------------------------------- indexing completed for grain #0 with matching rate 55.10 --------------------------------------------- writing fit file ------------------------- for grainindex= 0 self.dict_grain_matrix[grain_index] [[-0.071478224945242 -0.995814588672313 -0.056724144676328] [ 0.720639310822985 -0.012262885888099 -0.693156594892675] [ 0.689613233174427 -0.090416539541802 0.718545890295648]] self.refinedUBmatrix [[-0.071478224945242 -0.995814588672313 -0.056724144676328] [ 0.720639310822985 -0.012262885888099 -0.693156594892675] [ 0.689613233174427 -0.090416539541802 0.718545890295648]] new UBs matrix in q= UBs G (s for strain) strain_direct [[ 1.719550237533340e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 1.388845576189013e-05 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 3.998638790081444e-06]] deviatoric strain [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] new UBs matrix in q= UBs G (s for strain) strain_direct [[ 1.719550237533340e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 1.388845576189013e-05 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 3.998638790081444e-06]] deviatoric strain [[-4.815998025634964e-06 5.250997004746657e-06 -2.870284279887629e-05] [ 5.250997004746657e-06 7.352907498721824e-06 -9.199263307200638e-06] [-2.870284279887629e-05 -9.199263307200638e-06 -2.536909473086861e-06]] For comparison: a,b,c are rescaled with respect to the reference value of a = 5.657500 Angstroms lattice_parameter_direct_strain [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] final lattice_parameters [ 5.6575 5.657568845776604 5.6575132229395 90.0010541881893 90.00328909016345 89.99939828842365 ] File : Ge_blanc_0000Notebook_g0.fit written in /home/micha/LaueToolsPy3/LaueTools/notebooks Experimental experimental spots indices which are not indexed [] Missing reflections grainindex is -100 for indexed grainindex 0 within angular tolerance 0.500 Remaining nb of spots to index for grain #1 : 1 81 spots have been indexed over 82 indexing rate is --- : 98.8 percents indexation of ../LaueImages/Ge_blanc_0000Notebook.cor is completed for the 1 grain(s) that has(ve) been indexed as requested Leaving Index and Refine procedures... Saving unindexed fit file: ../LaueImages/Ge_blanc_0000Notebook_unindexed.cor File : ../LaueImages/Ge_blanc_0000Notebook_g0.fit written in /home/micha/LaueToolsPy3/LaueTools/notebooks
Indexation time 2.487 second(s)
Spots properties of the 10 first spots that have been indexed (sorted by intensity)
#spot 2theta chi X, Y intensity h k l energy
[[ 0.000000000000000e+00 5.842691500000000e+01 2.013003500000000e+01
6.231300000000000e+02 1.657730000000000e+03 2.979938000000000e+04
4.000000000000000e+00 2.000000000000000e+00 2.000000000000000e+00
1.099874517758171e+01]
[ 1.000000000000000e+00 5.763467200000000e+01 -1.841552300000000e+01
1.244330000000000e+03 1.662150000000000e+03 2.242563000000000e+04
2.000000000000000e+00 2.000000000000000e+00 4.000000000000000e+00
1.113626245226060e+01]
[ 2.000000000000000e+00 8.091984600000001e+01 6.615810000000000e-01
9.330400000000000e+02 1.215440000000000e+03 2.219754000000000e+04
3.000000000000000e+00 3.000000000000000e+00 3.000000000000000e+00
8.773642495456929e+00]
[ 3.000000000000000e+00 1.168117220000000e+02 2.128975200000000e+01
5.852300000000000e+02 5.888000000000000e+02 9.528830000000000e+03
4.000000000000000e+00 6.000000000000000e+00 2.000000000000000e+00
9.626187155122841e+00]
[ 4.000000000000000e+00 1.159585970000000e+02 -2.073868400000000e+01
1.276610000000000e+03 6.003000000000000e+02 9.153969999999999e+03
2.000000000000000e+00 6.000000000000000e+00 4.000000000000000e+00
9.671066779127555e+00]
[ 5.000000000000000e+00 1.097624120000000e+02 3.270820000000000e-01
9.326600000000000e+02 7.500800000000000e+02 6.940080000000000e+03
3.000000000000000e+00 5.000000000000000e+00 3.000000000000000e+00
8.784305505382406e+00]
[ 6.000000000000000e+00 9.664626300000000e+01 -3.623969200000000e+01
1.596620000000000e+03 9.353600000000000e+02 6.136730000000000e+03
1.000000000000000e+00 5.000000000000000e+00 5.000000000000000e+00
1.047621498150968e+01]
[ 7.000000000000000e+00 9.807526100000000e+01 3.749168800000000e+01
2.523600000000000e+02 9.206000000000000e+02 5.635550000000000e+03
5.000000000000000e+00 5.000000000000000e+00 1.000000000000000e+00
1.036136430057910e+01]
[ 8.000000000000000e+00 6.421410100000000e+01 -1.397936600000000e+01
1.168360000000000e+03 1.512820000000000e+03 5.570320000000000e+03
3.000000000000000e+00 3.000000000000000e+00 5.000000000000000e+00
1.351813316448898e+01]
[ 9.000000000000000e+00 9.620103100000000e+01 -4.831242900000000e+01
1.945880000000000e+03 9.142200000000000e+02 5.317320000000000e+03
0.000000000000000e+00 4.000000000000000e+00 4.000000000000000e+00
8.328162135695869e+00]]
DataSet is an object with many attributes and methods related to spots properties (indexed or not, belonging to grains counted from zero). By press Tab key after having typed DataSet. can show you infos about spots
array([[ 1.767565178965975e-01, -2.842461599074922e-17,
-2.842461599074922e-17],
[ 0.000000000000000e+00, 1.767565178965975e-01,
-1.082321519352500e-17],
[ 0.000000000000000e+00, 0.000000000000000e+00,
1.767565178965975e-01]])