;+ NAME: ; CENTERMASS ; ; PURPOSE: ; A function which returns the center of mass of datav ; ; CALLING SEQUENCE: ; Result = EXTRACTFUNC (XVALS, DATAV, VARV, SPECV) ; ; INPUTS: ; XVALS: The x values for the data ; DATAV: The sky subtracted data ; VARV: The variance ; SPECV: The spectrum ; ; OUTPUTS: ; ; ; MODIFICATION HISTORY: ; ; Written by: John Dermody, 22 Sep 2003 ; ; Thu Dec 18 22:53:00 2003, John Dermody ; cleaned up a bit ;- function centermass, xvals, datav, varv, specv return, total(xvals * (datav / specv)) end