Versions Compared

Key

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

...

Table of quaternions was generated using methods in pyimgalgos/src/Quaternion.py

Self-test for Quaternion

Quaternion.py is tested by self-test using uses a chain of conversions:

  • angles -> rotation matrix -> quaternion -> rotation matrix -> angles,

...

Code Block
titlecell-fiber.cell
collapsetrue
CrystFEL unit cell file version 1.0
lattice_type = triclinic
centering = I
a = 18.36 A
b = 26.65 A
c = 4.81 A
al = 90.0 deg
be = 90.0 deg
ga = 102.83 deg

Detector

Code Block
titledet1500x1500.geom
collapsetrue
adu_per_eV = 1.0
; Single panel
0/min_fs = 0
0/max_fs = 1500
0/min_ss = 0
0/max_ss = 1500
0/corner_x = -750.00
0/corner_y = -750.00
0/fs = x
0/ss = y
0/clen = 0.1      ; 10cm
0/res = 9090.9    ; 110 micron pixel size

pattern_sim

command to generate simulated events:

Code Block
cat quaternion_basis_x90.txt | pattern_sim -g simpledet1500x1500.geom -p cell-fiber.cell --photon-energy=60006003 -o result04result_x90 -n 43 -s 1 --background=1no-noise

Results

rotation around X by 0, 30, 60, 90, 120, 150 degree

Image RemovedImage RemovedImage RemovedImage RemovedImage RemovedImage Removed

rotation around Y by 0, 30, 60, 90, 120, 150 degree

 

Image RemovedImage RemovedImage RemovedImage RemovedImage RemovedImage Removed

rotation around Z by 0, 30, 60, 90, 120, 150 degree

Image RemovedImage RemovedImage RemovedImage RemovedImage RemovedImage Removed

Summary

...

Code Block
firstlinefiber trensverse to the beam beta=90, phi=0, omega=(0,180,30)
titlefiber trensverse to the beam beta=90, phi=0, omega=(0,180,30)
Angles around x,y,z:    90.0     0.0     0.0   quaternion: w, x, y, z:   0.707107   0.707107   0.000000   0.000000
Angles around x,y,z:    90.0     0.0    30.0   quaternion: w, x, y, z:   0.683013   0.683013   0.183013   0.183013
Angles around x,y,z:    90.0     0.0    60.0   quaternion: w, x, y, z:   0.612372   0.612372   0.353553   0.353553
Angles around x,y,z:    90.0     0.0    90.0   quaternion: w, x, y, z:   0.500000   0.500000   0.500000   0.500000
Angles around x,y,z:    90.0     0.0   120.0   quaternion: w, x, y, z:   0.353553   0.353553   0.612372   0.612372
Angles around x,y,z:    90.0     0.0   150.0   quaternion: w, x, y, z:   0.183013   0.183013   0.683013   0.683013

Image AddedImage AddedImage Added

 

Code Block
titlebeta=90+18=108, phi=3.5, omega=(0,180,30)
Angles around x,y,z:   108.0     3.5     0.0   quaternion: w, x, y, z:   0.587511   0.808640   0.017950  -0.024706
Angles around x,y,z:   108.0     3.5    30.0   quaternion: w, x, y, z:   0.573887   0.776440   0.226630   0.128195
Angles around x,y,z:   108.0     3.5    60.0   quaternion: w, x, y, z:   0.521153   0.691327   0.419865   0.272359
Angles around x,y,z:   108.0     3.5    90.0   quaternion: w, x, y, z:   0.432903   0.559102   0.584487   0.397963
Angles around x,y,z:   108.0     3.5   120.0   quaternion: w, x, y, z:   0.315152   0.388775   0.709278   0.496446
Angles around x,y,z:   108.0     3.5   150.0   quaternion: w, x, y, z:   0.175923   0.191953   0.785732   0.561098

Image AddedImage AddedImage Added

 

Summary

  • Thomas White did not advice to use pattern_sim due to potential bugs.
  • In stead he suggested to use diffraction.

...