imap_processing.hi.utils.get_bin_range_with_wrap#
- imap_processing.hi.utils.get_bin_range_with_wrap(first_bin: int, last_bin: int, n_bins: int, extend_by: int) ndarray#
Get bin range with wraparound and optional extension.
Computes a range of bin indices from first_bin to last_bin, optionally extending by a padding amount on each side, with proper wraparound handling for circular bin structures (e.g., spin bins).
- Parameters:
- Returns:
bins – Array of bin indices in the range, with wrapping handled.
- Return type:
np.ndarray