Fits a 1 dimensional polynomial to a data set.
If the data set is 1 dimensional then the polynomial coefficients are displayed.
If the data is more than one dimensional, then a series of 1 dimensional polynomial fits is made. The fits are made along the first axis in the dataset, whilst the other axes are looped over.
VARIANCE (errors**2), and QUALITY are taken into account if present.
Polynomials of degree 0 to 10 inclusive can be calculated.
The program output is a binned dataset containing either the fit to the data points (FIT = TRUE, default), or the original data minus the fit to it (DTREND = TRUE).
Either mode can be done in place by using the OVERWRITE parameter, otherwise a new output object will be created.