Skip to content

Commit

Permalink
added docstrings to transform routines #175
Browse files Browse the repository at this point in the history
  • Loading branch information
jacanchaplais committed May 31, 2024
1 parent 0848e79 commit bf124c0
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion graphicle/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,25 @@


class SphericalAngle(ty.NamedTuple):
"""Pair of inclination and azimuthal angles, respectively."""
"""Pair of inclination and azimuthal angles, respectively.
:group: transform
.. versionadded:: 0.4.0
"""

theta: float
phi: float


class SphericalAxis(ty.NamedTuple):
"""Axis vector in 3D cartesian coordinates.
:group: transform
.. versionadded:: 0.4.0
"""

x: float
y: float
z: float
Expand Down Expand Up @@ -56,6 +68,10 @@ def soft_hard_axis(momenta: gcl.MomentumArray) -> SphericalAngle:
"""Calculates the axis defined by the plane swept out between the
hardest and softest particles in ``momenta``.
:group: transform
.. versionadded:: 0.4.0
Parameters
----------
momenta : MomentumArray
Expand All @@ -80,6 +96,10 @@ def rotation_matrix(
"""Computes the matrix operator to rotate a 3D vector with respect
to an arbitrary ``axis`` by a given ``angle``.
:group: transform
.. versionadded:: 0.4.0
Parameters
----------
angle : float
Expand Down Expand Up @@ -123,6 +143,10 @@ def split_momentum(
Energy and 3-momentum is conserved. Hardness and collinearity of the
split are determined by ``z`` and ``angle``.
:group: transform
.. versionadded:: 0.4.0
Parameters
----------
momentum : MomentumArray
Expand Down Expand Up @@ -171,6 +195,10 @@ def split_hardest(
Hardness and collinearity of the split are determined by function
parameters.
:group: transform
.. versionadded:: 0.4.0
Parameters
----------
momenta : MomentumArray
Expand Down

0 comments on commit bf124c0

Please sign in to comment.