Fit every line of pixels parallel to any axis in a Lattice. If returnResiduals is True, return data-fit, otherwise return the fit. For baseline and continuum subtraction, returnResiduals would normally be True. If a GlishSysEventSource is provided, the progress of the fit will be monitored with progress events, which contains a double precision number with a value between 0.0 and 1.0. Set up a mask indicating what channels we want to fit over.
True means subtract the fit from the model.
Use logging classes, rather than the raw GlishSysEventSource. Allow per-pixel weights. Allow non-linear as well as linear LSQ fits.