refloxide.pxr¶
refloxide.pxr
¶
Pure python implementation of the 4x4 transfer matrix method.
This module is based on the code produced by Thomas Ferron and published in the following papers: https://doi.org/10.1021/jacsau.3c00168 https://doi.org/10.1021/acsami.1c19948
uniaxial_reflectivity(q, layers, tensor, energy)
¶
EMpy implementation of the uniaxial 4x4 matrix formalism.
for calculating reflectivity from a stratified medium.
Uses the implementation developed by FSRStools - https://github.com/ddietze/FSRStools - written by Daniel Dietze
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
NDArray
|
q values for which to calculate the reflectivity. Units: 1/Angstroms |
required |
layers
|
NDArray
|
coefficients required for the calculation, has shape (2 + N, 4), where N is the number of layers - layers[0, 1] - SLD of fronting (/1e-6 Angstrom-2) - layers[0, 2] - iSLD of fronting (/1e-6 Angstrom-2) - layers[N, 0] - thickness of layer N - layers[N, 1] - SLD of layer N (/1e-6 Angstrom-2) - layers[N, 2] - iSLD of layer N (/1e-6 Angstrom-2) - layers[N, 3] - roughness between layer N-1/N - layers[-1, 1] - SLD of backing (/1e-6 Angstrom-2) - layers[-1, 2] - iSLD of backing (/1e-6 Angstrom-2) - layers[-1, 3] - roughness between backing and last layer |
required |
tensor
|
NDArray
|
contains the 1x3x3 dimensions First dimension may change in teh fiture to account for multi-energy currently it will just cycle |
required |
scale
|
Multiply all reflectivities by this value. |
required | |
bkg
|
Linear background to be added to all reflectivities |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Reflectivity |
ndarray
|
Calculated reflectivity values for each q value. |
Source code in src/refloxide/pxr/tjf4x4.py
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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |