The functions rio_net() and roi_bg() return the net and background counts in the specified range. The background is calculated using a linear interpolation between the endpoints of the range.
>
create test 0 10 100
>
calc test = sin(test) + random(test)