;+ ; NAME: ; FINDTRACE.pro ; PURPOSE: ; To take two spectra, define the positive trace. ; DESCRIPTION: ; ; CATEGORY: ; CALLING SEQUENCE: ; yfit = FINDTRACE(star1, star2, flat) ; INPUTS: ; star1 - one star spectrum (nod a) ; star2 - another star spectrum (nod b) ; flat - the flat image ; OUTPUTS: ; yFit - the y array describing the spectral trace ; ; KEYWORD OUTPUT PARAMETERS: ; ; MODIFICATION HISTORY: ; 22-APR-2004, CBO, SwRI ; 10-Jun-2004, CBO, SwRI - changed the name from tracegaussian to FindTrace. ; made it a function instead of a procedure ; removed the gaussian fitting whose output wasn't being used ;- function FINDTRACE, star1, star2, superf df1_2 = (star1 - star2)/superf rdf1_2 = rotate(df1_2, 3) sz = size(rdf1_2, /dim) rowmax=fltarr(sz[1]) for irow=0, sz[1]-1 do begin & m=max(rdf1_2[irow,*], w) & rowmax[irow]=w & endfor res = goodpoly(findgen(sz[1]), rowmax, 2, 3.0, yfit, xused, yused) return, yfit end