# # GETSHIFTS - find spectra spatial center and compute shifts # # ver 1.0: 6 mar 92 dave silva, richard elston # procedure getshifts(input) string input {prompt="List of files"} struct *wlist begin string inlist, obj, wrk1, apfile string sdum real xdum, center, shift, refcen inlist = input wrk1 = mktemp("xyz") list = inlist while( fscan(list,obj) != EOF ){ apfile = "database/ap"//obj del(apfile,ver-) } hedit("@"//inlist,"dispaxis",1,add+,update+,ver-,show-) apfind ("@"//inlist, 1, references="", interactive=yes, find=yes, recenter=no, resize=no, edit=yes, line=186 , nsum=10, minsep=5., maxsep=1000., order="increasing") list = inlist while( fscan(list,obj) != EOF ){ apfile = "database/ap"//obj match("center",apfile,>> wrk1) } list = wrk1 i = fscan(list,sdum,refcen, xdum) list = wrk1 while( fscan(list,sdum,center, xdum) != EOF ){ shift = refcen - center print(shift, "0.00 ") } del(wrk1,ver-) end