Physics and Material Constants
This section documents the physical foundations of the simulation, including target properties and spline-interpolated interaction cross-sections.
lib.physics_base
Fundamental Physical Constants and QED Formulations Module.
Provides standard CODATA / Particle Data Group (PDG) constants and exact quantum electrodynamics (QED) cross-section equations. All energy calculations are calibrated in keV.
adrv_bound(u, k)
Analytical antiderivative for dσ/du. Used to calculate bounds without slow numerical integration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
u |
float
|
Ratio (E-E_prime)/E of energy transfer to initial photon energy. |
required |
k |
float
|
Ratio of initial photon energy to the electron rest mass. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Antiderivative of dσ/du in barns. |
Source code in lib/physics_base.py
sample_bound_compton_energy(E, E_bind)
Samples the scattered photon energy E_prime using Kahn's method, recommitting the sampled kinematics into the energy-transfer fraction scale u = (E - E_prime) / E bounded by strict atomic subshell thresholds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
E |
float
|
Incident photon energy in keV. |
required |
E_bind |
float
|
Binding energy of the target atomic subshell in keV. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Scattered photon energy (E_prime) in keV. |
Source code in lib/physics_base.py
σ_KN_bound_shell(E, E_bind, n_elec=1)
Calculates the integrated cross-section (in barns) for a specific bound shell using YOUR fast analytical antiderivative with strict energy threshold check.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
E |
float
|
Incident photon energy in keV. |
required |
E_bind |
float
|
Binding energy of the target atomic subshell in keV. |
required |
n_elec |
Number of electrons as multiplication factor. |
1
|
Returns:
| Type | Description |
|---|---|
float
|
Scattering x-section in barns. |
Source code in lib/physics_base.py
σ_KN_free(E)
Calculates the exact analytical total Klein-Nishina cross-section for a single FREE electron (in barns) using the general QED expression. Safe and stable near zero energy limit (converges to Thomson cross-section).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
E |
float
|
Incident photon energy in keV. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Scattering x-section in barns. |
Source code in lib/physics_base.py
Target Atom Management
The target parameters and cubic spline interpolators are managed by the Atom configuration engine.
atom_prepare
Database Builder and Physics Compiler Module for GEIM Simulation.
Parses processed EPICS2023 raw data structures, builds high-precision CubicSpline interpolators, calculates atomic relaxation tables, computes calibrated multi-shell Compton cross-sections using physics_base analytics, and dumps everything into a single performance-optimized pickle database.
build_database(source_pckl='EPICS2023.pckl', output_pckl='geim_data.pckl')
Loads raw EPICS parser output, compiles CubicSplines and relaxation tables, integrates physics_base formulations, and exports the final simulation database.
Source code in atom_prepare.py
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 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
calculate_relaxation_table(subshells, raw_data)
Computes cumulative atomic relaxation probability tables for cascade logic.
Splits transition data into 2-step Monte Carlo lookups aligned with EADL: 1. Select the intermediate vacancy subshell. 2. Decide outcome (Radiative photon or Non-radiative Auger electron).