;+ ; Subtract a baseline using the stored coefficients in !g.polyfit and !g.nfit ; from the data in the primary data container. ; ; @keyword nfit {in}{optional}{type=integer} Only use at most nfit ; parameters. If !g.nfit is < nfit, then only !g.nfit parameters will ; be used and a warning will be issued. ; ; @keyword ok {out}{optional}{type=boolean} 1 on success, 0 on failure. ; ; @examples ;
; ; subtract the baseline ; bsubtract ; ; or, specify the nfit directly ; bsubtract, nfit=2 ;; ; @uses getbasemodel ; ; @version $Id: bsubtract.pro,v 1.1 2005/04/26 19:12:27 bgarwood Exp $ ;- pro bsubtract, nfit=nfit, ok=ok compile_opt idl2 model = getbasemodel(nfit=nfit,ok=ok) if ok then begin if (!g.line) then begin *!g.s[0].data_ptr -= model endif else begin *!g.c[0].data_ptr -= model endelse endif if not !g.frozen then show end