Blame view

src/idl/bg_mpfit.pro 255 Bytes
427f1205   Jean-Michel Glorian   version 4.2 merged
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
; 
; 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