Skip to content

Commit

Permalink
Update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
oashour committed Apr 21, 2024
1 parent 7ae6d36 commit 00ab2c2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
15 changes: 15 additions & 0 deletions darkmagic/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,21 @@ def write_hdf5(
...
]
This format is temporary, just for backwards compatibility with PhonoDark.
Args:
- out_file: Path to the output HDF5 file.
- material: Material object.
- model: Model object.
- numerics: Numerics object.
- masses: List of masses for the jobs.
- times: List of times for the jobs.
- all_total_rate_list: List of total rate data.
- all_diff_rate_list: List of differential rate data.
- all_binned_rate_list: List of binned rate data.
- comm: MPI communicator for parallel writing (default is None).
Returns:
- None
"""

def get_dicts(model, numerics, masses, times):
Expand Down
14 changes: 7 additions & 7 deletions darkmagic/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class MaterialProperties:
Attributes:
N (dict): Dictionary of number densities for different particles.
S (dict): Dictionary of spin vectors for different particles.
L (dict): Dictionary of orbital angular momentum vectors for different particles.
L_dot_S (dict): Dictionary of dot products of orbital angular momentum and spin vectors for different particles.
L_tens_S (dict): Dictionary of tensor products of orbital angular momentum and spin vectors for different particles.
lambda_S (ArrayLike): Array-like object representing the spin-spin interaction strength.
lambda_L (ArrayLike): Array-like object representing the orbital-orbital interaction strength.
N (dict): Fermion numbers.
S (dict): Spin vectors.
L (dict): Orbital angular momentum vectors.
L_dot_S (dict): $L \cdot S$
L_tens_S (dict): Spin orbit coupling tensor $L \otimes S$
lambda_S (ArrayLike): spin-coefficient for magnons
lambda_L (ArrayLike): orbital angular mom.-coefficient for magnons
m_psi (dict): Dictionary of masses for different particles.
Methods:
Expand Down
6 changes: 6 additions & 0 deletions darkmagic/v_integrals.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,16 @@ def g1(self):
This integral is equivalent to
$$
g1 = (v_star \hat{q} - v_e - \vec{q}/2/m_chi) * g0
$$
Note: this is defined slightly differently in the original
phonodark. Specifically,
$$
g1 = (v_star R[:,2] - v_e) * g0
$$
where R is a matrix that rotates \hat{q} to lie along the z-axis
"""
Expand Down Expand Up @@ -130,7 +134,9 @@ def X(self):
"""
Computes the X vector for each (q, omega) pair
$$
X = (\omega / |q|) \hat{q} - (\mathbb{1} - \hat{q} \otimes \hat{q}) v_e
$$
The result is a 3D array of shape (n_q, n_modes, 3)
"""
Expand Down

0 comments on commit 00ab2c2

Please sign in to comment.