bg_mpfit.pro 255 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ; ; Used by fit_sed.pro ; ; function bg_mpfit, a, XVAL=x, YVAL=y, ERRVAL=err, COLOR_C= color_c if n_elements(err) EQ 0 then begin err = x err(*) = 1. endif model = BG( x, a, COLOR_C= color_c ) res = (y-model)/err return, res end