pro gfit ;------------------------------------- ; The GFIT program reads the spectra from FITS, intializes and assigns ; the appropriate variable from the FITS header and calls the LOOPFIT ; routines to fit Gaussians to each spectra ;------------------------------------- common dev_block,spec1,spec0,vpeak1,vdisp0,q,vpeak0,tau,stau,$ fitparams,outdata,vdisppt,vpeakpt,mask,res,err,tol,s2n,smw,$ flag2,flag3,flag4,flag5,mapparams common data_block, data0,nx0,ny0,nv0, $ x0,y0,v0,dx0,dy0,dv0,i0,j0,k0 common thin_vel, x_thin,y_thin,v_thin common header_block, naxis1,crpix1,cdelt1,crval1,ctype1, $ naxis2,crpix2,cdelt2,crval2,ctype2, $ naxis3,crpix3,cdelt3,crval3,ctype3 @parameters plhold=init(file0,flag) ;read datacube and initialize variables fitparams=loopfit(data0,v0,dv0,q,s2n) end