Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content

Table of Contents

Implementation of algorithms

pyimgalgos/src/FiberIndexing.py  self-documentation

Script

cxif5315/make-index-table.py

Triclinic crystal cell parameters

Triclinic crystal cell  in 3-d is described by cell edge lengthes, a, b, c, and associated angles between edges, alpha, beta, and gamma, as shown in the plot.

Code Block
                *----------*
               / \        / \
              /   \      /   \
             /     \ gamma    \
            /       *----------*
           /       /  /       /
          /alpha  /  /       /
         *-------/--*       c
          \     /    \beta /
           a   /      \   /
            \ /        \ /
             *-----b----*

As a starting point in this analysis we use parameters from previous study

Code Block
  a = 18.36 A
  b = 26.65 A
  c = 4.81 A
  alpha = 90.00 deg
  beta  = 90.00 deg
  gamma = 102.83 deg

See: Crystal structure, Bravais lattice, Crystal system, Primitive cell, Lattice constant

3-d space primitive vectors

Crystal cell parameters can be transformed to 3-d primitive vectors

Code Block
  a1 = (18.36, 0.0, 0.0)
  a2 = (5.917873795354449, 25.984635262829016, 0.0)
  a3 = (0.0, 0.0, 4.81)

Reciprocal space primitive vectors

See: Reciprocal lattice, Surface diffraction, Miller index3-d primitive vectors can be converted in reciprocal space primitive vectors

Code Block
  b1 = [ 0.05446623  0.01240442  0.        ]
  b2 = [ 0.          0.03848428  0.        ]
  b3 = [ 0.          0.          0.20790021]

 See: Reciprocal lattice, Surface diffraction, Miller index

Table of lattice nodes sorted by radius

Lattice nodes in reciprocal space can be evaluated from primitive vectors and associated Muller indexes h,k,l. Lattice nodes ordered by ascending R(h,k,l) - distance between (h,k,l) and (0,0,0) points, is presented in table

Code Block
2-d case                3-d case
( h, k) R(h,k)[1/A]     ( h, k, l) R(h,k,l)[1/A]
___________________     ________________________
( 0, 0) 0.0000          ( 0, 0, 0) 0.0000
( 0, 1) 0.0385          ( 0, 1, 0) 0.0385
( 1, 0) 0.0559          ( 1, 0, 0) 0.0559
(-1, 1) 0.0604          (-1, 1, 0) 0.0604
( 1, 1) 0.0745          ( 1, 1, 0) 0.0745
( 0, 2) 0.0770          ( 0, 2, 0) 0.0770
(-1, 2) 0.0845          (-1, 2, 0) 0.0845
( 1, 2) 0.1047          ( 1, 2, 0) 0.1047
(-2, 1) 0.1098          (-2, 1, 0) 0.1098
( 2, 0) 0.1117          ( 2, 0, 0) 0.1117
( 0, 3) 0.1155          ( 0, 3, 0) 0.1155
(-1, 3) 0.1166          (-1, 3, 0) 0.1166
(-2, 2) 0.1208          (-2, 2, 0) 0.1208
( 2, 1) 0.1260          ( 2, 1, 0) 0.1260
( 1, 3) 0.1390          ( 1, 3, 0) 0.1390
(-2, 3) 0.1417          (-2, 3, 0) 0.1417
( 2, 2) 0.1491          ( 2, 2, 0) 0.1491
(-1, 4) 0.1517          (-1, 4, 0) 0.1517
( 0, 4) 0.1539          ( 0, 4, 0) 0.1539
(-3, 1) 0.1634          (-3, 1, 0) 0.1634
( 3, 0) 0.1676          ( 3, 0, 0) 0.1676
(-3, 2) 0.1682          (-3, 2, 0) 0.1682
(-2, 4) 0.1689          (-2, 4, 0) 0.1689
( 1, 4) 0.1750          ( 1, 4, 0) 0.1750
( 2, 3) 0.1776          ( 2, 3, 0) 0.1776
( 3, 1) 0.1801          ( 3, 1, 0) 0.1801
(-3, 3) 0.1812          (-3, 3, 0) 0.1812
(-1, 5) 0.1881          (-1, 5, 0) 0.1881
( 0, 5) 0.1924          ( 0, 5, 0) 0.1924
( 3, 2) 0.1993          ( 3, 2, 0) 0.1993
(-2, 5) 0.1999          (-2, 5, 0) 0.1999
(-3, 4) 0.2008          (-3, 4, 0) 0.2008
( 2, 4) 0.2093          ( 0, 0, 1) 0.2079 1st contributing index with l=1
( 1, 5) 0.2119          ( 2, 4, 0) 0.2093
(-4, 1) 0.2181          ( 0, 1, 1) 0.2114
(-4, 2) 0.2196          ( 1, 5, 0) 0.2119
( 4, 0) 0.2234          ( 1, 0, 1) 0.2153
( 3, 3) 0.2236          (-1, 1, 1) 0.2165
(-3, 5) 0.2254          (-4, 1, 0) 0.2181
(-4, 3) 0.2276          (-4, 2, 0) 0.2196
( 4, 1) 0.2350          ( 1, 1, 1) 0.2209
(-4, 4) 0.2416          ( 0, 2, 1) 0.2217
( 2, 5) 0.2430          ( 4, 0, 0) 0.2234
( 3, 4) 0.2515          ( 3, 3, 0) 0.2236
( 4, 2) 0.2520          (-1, 2, 1) 0.2244
(-4, 5) 0.2605          (-3, 5, 0) 0.2254
(-5, 2) 0.2727          (-4, 3, 0) 0.2276
( 4, 3) 0.2733          ( 1, 2, 1) 0.2328
(-5, 1) 0.2733          ( 4, 1, 0) 0.2350
(-5, 3) 0.2775          (-2, 1, 1) 0.2351
( 5, 0) 0.2793          ( 2, 0, 1) 0.2360
( 3, 5) 0.2818          ( 0, 3, 1) 0.2378
(-5, 4) 0.2874          (-1, 3, 1) 0.2383
( 5, 1) 0.2903          (-2, 2, 1) 0.2404
( 4, 4) 0.2982          (-4, 4, 0) 0.2416
(-5, 5) 0.3019          ( 2, 5, 0) 0.2430
( 5, 2) 0.3057          ( 2, 1, 1) 0.2431
( 5, 3) 0.3251          ( 1, 3, 1) 0.2501
( 4, 5) 0.3257          ( 3, 4, 0) 0.2515
( 5, 4) 0.3476          (-2, 3, 1) 0.2516
( 5, 5) 0.3727          ( 4, 2, 0) 0.2520

...

Comparison of the look-up table and data (geometry and lattice parameters are re-tuned)

 

Indexing

 

 

 

...

Script

proc-cxif5315-r0169-peaks-from-file-v2.py - loop over peaks in event and try to associate event peaks with a list of predicted for each crystal orientation. Most probable combination is saved in the file.

File record for event

There are three states for matching peaks in event indexing:

  1. MATCHED - peak is matched to predicted crystal node,
  2. PEAK-NM - peak in data is not matched with any of predicted nodes,

  3. NODE-NM - predicted crystal node is on Evald sphere, but peak in data is missing.

Event indexing table contains records for all peaks from data and for all predicted nodes from crystal orientation. Each record consists of three parts; status word, peak information, and orientation information. In case if orientation or peak information is missing it is replaced by zeros, like shown in example below.

Code Block
  STATE phi-fit beta-fit   qh-fit    qv-fit  dqh[1/A]   Exp     Run  time(sec)   time(nsec) fiduc    Evnum  Reg  Seg  Row  Col  Npix      Amax      Atot   rcent   ccent rsigma  csigma rmin rmax cmin cmax    bkgd     rms     son  imrow   imcol     x[um]     y[um]     r[um]  phi[deg]   index    beta   omega   h   k   l   dr[1/A]  R(h,k,l)   qv[1/A]   qh[1/A]  P(omega)
NODE-NM   -7.98  -12.45  0.000000  0.000000  0.000000 cxif5315  169  1424601179  232228024  105684   85184  N/A    0    0    0     0       0.0       0.0     0.0     0.0   0.00    0.00    0    0    0    0    0.00    0.00    0.00      0       0         0         0         0      0.00    230   180.00  114.50   3  -4   0  0.001658  0.199684  0.000000  0.199336  0.230902
PEAK-NM   -7.98  -12.45  0.083921  0.000014  0.000000 cxif5315  169  1424601179  232228024  105684   85184  EQU    1   72   44    31     220.9    1976.6    73.4    42.7   2.49    1.45   70   80   39   46   16.23   19.99   10.23    559     730     17471      2112     17598      6.89      0     0.00    0.00   0   0   0  0.000000  0.000000  0.000000  0.000000  0.000000
MATCHED   -7.98  -12.45  0.059485 -0.000022  0.000448 cxif5315  169  1424601179  232228024  105684   85184  EQU    1  119   39    59    1293.5   11106.4   119.0    39.5   1.69    1.50  112  125   36   45   17.81   31.87   40.03    564     683     12306      1551     12403      7.18    230   180.00  114.50   1  -1   0  0.001936  0.060084  0.000000  0.059933  0.135565
MATCHED   -7.98  -12.45 -0.166810 -0.000001  0.000288 cxif5315  169  1424601179  232228024  105684   85184  EQU   16  121  101    88     276.3    6888.4   120.0   103.1   2.52    2.93  115  127   98  110   39.18   36.32    6.53    637     247    -35645     -6412     36217   -169.80    230   180.00  114.50  -3   2   0  0.000051  0.167107  0.000000 -0.167098  0.998636

This information for all events goes in the file with name like peak-idx-cxif5315-r0169-2015-11-13T17:04:37.txt.

Result presenter

cxif5315/proc-cxif5315-r0169-idx-file.py

reads file obtained in previous section using

Code Block
from pyimgalgos.TDFileContainer import TDFileContainer
from pyimgalgos.TDMatchRecord   import TDMatchRecord

and generates summary tables/images with results as listed below.

Crystal in h-k space

Image Added

Code Block
k   :       -6       -5       -4       -3       -2       -1        0        1        2        3        4        5        6 
h=-4:   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000 
h=-3:   0.0000   0.0000   0.0000   0.0000   0.0000   0.0222   0.0618   0.0000   1.0000   0.0075   0.0680   0.0000   0.0000 
h=-2:   0.0000   0.0000   0.0156   0.0158   0.0013   0.0000   0.2334   0.6190   0.0272   0.0000   0.0078   0.3472   0.0000 
h=-1:   0.0000   0.0070   0.0395   0.0000   0.0023   0.0000   0.1424   0.2158   0.3511   0.0036   0.0273   0.0019   0.0000 
h= 0:   0.0000   0.0015   0.0131   0.0135   0.0031   0.0000   0.4409   0.0000   0.0290   0.0600   0.0389   0.0015   0.0000 
h= 1:   0.0000   0.0000   0.0319   0.0000   0.3228   0.1522   0.1187   0.0038   0.0000   0.0000   0.0173   0.0089   0.0000 
h= 2:   0.0000   0.3036   0.0131   0.0011   0.0043   0.5837   0.2267   0.0000   0.0039   0.0000   0.0000   0.0000   0.0000 
h= 3:   0.0000   0.0000   0.0708   0.0049   0.7698   0.0000   0.0699   0.0172   0.0014   0.0035   0.0000   0.0000   0.0000 
h= 4:   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000

Crystal in reciprocal space

Image Added

 

Try peak_finder_v3

We try to use peak_finder_v3 with parameters (see  Peak finders for more detail. ).

Code Block
alg_arc = PyAlgos(windows=winds_arc, mask=mask_arc, pbits=0)
alg_arc.set_peak_selection_pars(npix_min=5, npix_max=100, amax_thr=0, atot_thr=2000, son_min=6)
alg_equ = PyAlgos(windows=winds_equ, mask=mask_equ, pbits=0)
alg_equ.set_peak_selection_pars(npix_min=5, npix_max=100, amax_thr=0, atot_thr=2000, son_min=6)
...
        peaks_arc = alg_arc.peak_finder_v3(nda, rank=5, r0=5, dr=0.05)
        peaks_equ = alg_equ.peak_finder_v3(nda, rank=5, r0=5, dr=0.05)

It finds approximately 3× more (seed) peaks with higher atot_thr than peak_finder_v2.

This makes event selection more complicated and in result the same matching algorithm finds 4× less peaks. Image Added

 

 

 

 

References

...