Skip to content

Commit

Permalink
docs(tools): add parameters to docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
rikvl committed Jun 7, 2024
1 parent 7fa8958 commit 0fd91d7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ch_util/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2481,9 +2481,14 @@ def delay(
def beam_index2number(beam_index):
"""Convert beam "index" (0-1023) to beam "number" (0-255, 1000-1255, etc.)
The latter, with 1000s indicating the beam's East-West index and the remainder
going from 0 through 255 indicating the beam's North-South index, is used in
the CHIME/FRB beam_model package."""
Parameters
----------
beam_index : int or np.ndarray of int
The beam index or indices to be converted.
The beam "number", with 1000s indicating the beam's East-West index and the
remainder going from 0 through 255 indicating the beam's North-South index,
is used in the CHIME/FRB beam_model package."""
beam_ew_index = beam_index // 256
beam_ns_index = beam_index % 256
beam_number = 1000 * beam_ew_index + beam_ns_index
Expand Down

0 comments on commit 0fd91d7

Please sign in to comment.