Skip to content

Commit 3ca64a9

Browse files
committed
docstring
1 parent 0e8b5e3 commit 3ca64a9

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/aspire/abinitio/commonline_utils.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,18 @@ def _complete_third_row_to_rot(r3):
273273

274274

275275
def _cl_angles_to_ind(cl_angles, n_theta):
276+
"""
277+
Map 2D direction vectors to discretized angular indices.
278+
279+
For each 2D vector [x, y] in `cl_angles`, compute its polar angle
280+
and find the nearest of `n_theta` polar ray indices.
281+
282+
:param cl_angles: Array of shape (n, 2) of [x, y] values corresponding
283+
to the commonline induced by a pair of rotations.
284+
:param n_theta: Resolution of polar rays.
285+
286+
:return: int or array of length n of commonline indice in the range [0, n_theta - 1].
287+
"""
276288
thetas = np.arctan2(cl_angles[:, 1], cl_angles[:, 0])
277289

278290
# Shift from [-pi,pi] to [0,2*pi).

0 commit comments

Comments
 (0)