roi(), roi_net, roi_bg

Format:
roi( scan_id [, x_min[, x_max]])
roi_net( scan_id [, x_min[, x_max]])
roi_bg( scan_id [, x_min[, x_max]])
Result:
Number
Description:
The function rio() calculates the sum of the y-values in the range [x_min, x_max]. The defaults for x_min and x_max are the window limits.

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.

e.g.:
SPECTRA> create test 0 10 100
SPECTRA> calc test = sin(test) + random(test)