linear_regression

Format:
linear_regression(scan_id)
linear_regression(scan_id, a)
linear_regression(scan_id, b)
linear_regression(scan_id, t)
Result:
Number, text
Description:
Returns the result of the linear regression: y = a + b*x. The meaning of t is $\chi^2/(d.o.f. - 2)$. The second parameter selects a, b or t. If the second parameter is omitted, the functions returns a string that contains all of them.
e.g.:
SPECTRA> * = linear(sname)
(a = 1.23, b = 2.34, t = 12)
SPECTRA> * = linear(sname, a)
1.23