numerics
MonkhorstPackGrid(N_grid, material, shift=True, use_sym=False)
A class representing a Monkhorst-Pack grid for Brillouin zone sampling.
Attributes:
Name | Type | Description |
---|---|---|
k_frac |
ndarray
|
The fractional coordinates of the k vectors. |
weights |
ndarray
|
The weights of the k vectors. |
N_grid (ArrayLike): The number of grid points along each reciprocal lattice vector. material (Material): The material for which the grid is generated. shift (bool): Whether to shift the grid. Defaults to a shifted grid to avoid singularities in DWF. use_sym (bool, optional): Whether to use symmetry to reduce the number of grid points. Defaults to False. The W tensor is only calculated once so this isn't necessary to use and causes issues.
Source code in darkmagic/numerics.py
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 |
|
SphericalGrid(m_chi, v_e, use_q_cut, N_grid, material)
Represents a spherical grid used for numerical calculations in DarkMAGIC.
Attributes:
Name | Type | Description |
---|---|---|
nq |
int
|
The number of q points. |
q_max |
float
|
The maximum value of the q vector (eV). |
q_cart |
ndarray
|
The Cartesian coordinates of the q vectors (eV). |
q_frac |
ndarray
|
The fractional coordinates of the q vectors. |
q_norm |
ndarray
|
The norms of the q vectors (eV). |
q_hat |
ndarray
|
The unit vectors of the q vectors. |
G_cart |
ndarray
|
The Cartesian coordinates of the G vectors (eV). |
G_frac |
ndarray
|
The fractional coordinates of the G vectors. |
jacobian |
ndarray
|
The Jacobian determinant for the spherical grid. |
k_frac |
ndarray
|
The fractional coordinates of the k vectors. |
k_cart |
ndarray
|
The Cartesian coordinates of the k vectors. |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m_chi |
float
|
The mass of the dark matter particle. |
required |
v_e |
ArrayLike
|
The velocity of the Earth. |
required |
use_q_cut |
bool
|
Whether to use the q_cut value. |
required |
N_grid |
ArrayLike
|
The number of grid points (radial, azimuthal, polar) |
required |
material |
Material
|
A Material object containing the material properties. |
required |
Source code in darkmagic/numerics.py
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 |
|
Numerics(N_grid=None, power_abc=None, N_DWF_grid=None, bin_width=0.001, use_q_cut=True, use_special_mesh=False)
A class that represents the numerical parameters for DarkMAGIC calculations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
N_grid |
ArrayLike
|
The number of grid points in each dimension. Defaults to [20, 10, 10]. |
None
|
power_abc |
ArrayLike
|
The power of each dimension in the grid. Defaults to [2, 1, 1]. |
None
|
N_DWF_grid |
ArrayLike
|
The number of grid points in each dimension for the density-weighted Fermi grid. Defaults to [20, 20, 20]. |
None
|
bin_width |
float
|
The width of the bin. Defaults to 1e-3 (1 meV). |
0.001
|
use_q_cut |
bool
|
Whether to use a cutoff in momentum space. Defaults to True. |
True
|
use_special_mesh |
bool
|
Whether to use a special mesh for the grid. Defaults to False. |
False
|
Attributes:
Name | Type | Description |
---|---|---|
N_grid |
ndarray
|
The number of grid points in the spherical grid used to sample the momentum transfer (radial, azimuthal, polar). |
power_abc |
ndarray
|
The power of each dimension in the grid (currently unsued) |
N_DWF_grid |
ndarray
|
The size of the Monkhorst-Pack grid used to compute the Debye-Waller factor. |
bin_width |
float
|
The width of the energy bin. Rebinning to larger bins is possible in postprocessing. |
use_q_cut |
bool
|
Whether to use a cutoff for the momentum transfer from DM. If False, the cutoff is set to the maximum possible value \(2 m_{\chi} (v_{\text{esc}} + v_{\text{e}})\). |
use_special_mesh |
bool
|
Whether to use a special mesh for the spherical grid (currently unused) |
Methods:
Name | Description |
---|---|
get_grid |
float, v_e: ArrayLike, material: Material) -> SphericalGrid: Returns the spherical grid for the given dark matter mass, Earth velocity, and material. |
get_DWF_grid |
Material) -> MonkhorstPackGrid: Returns the Monkhorst-Pack grid for computing the Debye-Waller factor. |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
N_grid |
ndarray
|
The number of grid points in the spherical grid used to sample the momentum transfer (radial, azimuthal, polar). |
None
|
power_abc |
ndarray
|
The power of each dimension in the grid (currently unsued) |
None
|
N_DWF_grid |
ndarray
|
The size of the Monkhorst-Pack grid used to compute the Debye-Waller factor. |
None
|
bin_width |
float
|
The width of the energy bin. Rebinning to larger bins is possible in postprocessing. |
0.001
|
use_q_cut |
bool
|
Whether to use a cutoff for the momentum transfer from DM. If False, the cutoff is set to the maximum possible value \(2 m_{\chi} (v_{\text{esc}} + v_{\text{e}})\). |
True
|
use_special_mesh |
bool
|
Whether to use a special mesh for the spherical grid (currently unused) |
False
|
Source code in darkmagic/numerics.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
|
get_grid(m_chi, v_e, material)
Returns the spherical grid object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m_chi |
float
|
The mass of the dark matter particle. |
required |
v_e |
ArrayLike
|
The velocity of the Earth. |
required |
material |
Material
|
The material object. |
required |
Returns:
Name | Type | Description |
---|---|---|
SphericalGrid |
SphericalGrid
|
The spherical grid object. |
Source code in darkmagic/numerics.py
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
|
get_DWF_grid(material)
Returns the density-weighted Fermi grid object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
material |
Material
|
The material object. |
required |
Returns:
Name | Type | Description |
---|---|---|
MonkhorstPackGrid |
MonkhorstPackGrid
|
The density-weighted Fermi grid object. |
Source code in darkmagic/numerics.py
303 304 305 306 307 308 309 310 311 312 313 |
|