File: test_crystals.py

package info (click to toggle)
python-xrt 1.6.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 17,572 kB
  • sloc: python: 59,424; xml: 4,786; lisp: 4,082; sh: 22; javascript: 18; makefile: 17
file content (31 lines) | stat: -rw-r--r-- 757 bytes parent folder | download | duplicates (2)
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
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 19 15:15:38 2014

@author: konkle
"""

import os, sys; sys.path.append(os.path.join('..', '..'))  # analysis:ignore
import xrt.backends.raycing.materials as rm

xtalSi = rm.CrystalSi(hkl=(1, 1, 1), tK=300, rho=2.3296)

xtalSiGeneral = rm.CrystalFromCell(
    'silicon', (1, 1, 1), a=5.4311946,
    atoms=['Si']*8,
    atomsXYZ=[[0.0, 0.0, 0.0],
              [0.0, 0.5, 0.5],
              [0.5, 0.0, 0.5],
              [0.5, 0.5, 0.0],
              [.25, .25, .25],
              [.25, .75, .75],
              [.75, .25, .75],
              [.75, .75, .25]])

E0 = 4000.

xtal = xtalSi
print(xtal.get_structure_factor(E0, 0.5/xtal.d))

xtal = xtalSiGeneral
print(xtal.get_structure_factor(E0, 0.5/xtal.d))