Skip to content

Commit adb9c45

Browse files
Jammy2211Jammy2211
authored andcommitted
docstring
1 parent 8b67803 commit adb9c45

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

autogalaxy/profiles/mass/total/power_law_multipole.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,30 @@ def __init__(
123123
self.multipole_comps = multipole_comps
124124

125125
def k_m_and_angle_m_from(self, xp=np) -> Tuple[float, float]:
126+
"""
127+
Return the multipole normalization ``k_m`` and orientation angle ``angle_m``.
128+
129+
The multipole normalization and angle are computed from the multipole component
130+
parameters ``(epsilon_1, epsilon_2)`` using
131+
:func:`convert.multipole_k_m_and_phi_m_from`. The returned angle is converted
132+
from degrees to radians.
133+
134+
The numerical backend can be selected via the ``xp`` argument, allowing this
135+
method to be used with both NumPy and JAX (e.g. inside ``jax.jit``-compiled
136+
code).
126137
138+
Parameters
139+
----------
140+
xp
141+
Numerical backend module, typically ``numpy`` or ``jax.numpy``.
142+
143+
Returns
144+
-------
145+
k_m
146+
The multipole normalization.
147+
angle_m
148+
The multipole orientation angle in radians.
149+
"""
127150
from astropy import units
128151

129152
k_m, angle_m = convert.multipole_k_m_and_phi_m_from(

0 commit comments

Comments
 (0)