openg2g.utils¶
openg2g.utils
¶
Shared utility functions.
split_integer_evenly(n, k)
¶
Split integer n into k non-negative integers whose sum is n, differing by at most 1.
Example:
Source code in openg2g/utils.py
smooth_bump(t, t_center, half_width)
¶
Smooth bump function: 1 at center, 0 outside half_width.