procedure tshifts (refImage,sample1,sample2) string refImage {prompt="Reference image (**full name**)"} string sample1 {prompt="Sample image 1 (**full name**)"} string sample2 {prompt="Sample image 1 (**full name**)"} begin # Variable Declarations: # Cleaning-up: delete (files="temp_*.out",go_ahea+,ver-) if (! defpac ("images")) { print("Package IMAGES needs to be loaded.") bye } if (! defpac ("proto")) { print("Package PROTO needs to be loaded.") bye } print (" ") print ("Obtaining coordinates of comparison stars ...") # 1. Taking coordinates from reference image: display (image=refImage,frame=1,erase+,bord-, sele+,repe-,fill-,zscal+,ztrans="linear", >> "temp_junk.out") print (" ") print (" *** REFERENCE IMAGE: Currently displayed in 'Ximtool' ***") print (" *** Select a sample of comparison stars ***") print (" ") print (" --> Use to select each star and type when done.") imexam(input=refImage,frame=1,image=refImage,keeplog-,defkey="a",autor+, allfram+,nfram=0,graphcu="",imagecu="",wcs="logical",graphic="stdgraph", display="display(image='$1',frame=$2)",use_dis+,flpar-, >> "temp_imexamREF.out") fields (files="temp_imexamREF.out",fields="1,2",lines="1-9999",quit_if-, print_f-,flpar-, >> "temp_REF.out") fields (files="temp_imexamREF.out",fields="11",lines="1-9999",quit_if-, print_f-,flpar-, >> "tshifts.FWHM") print (" ") print (" List of star coordinates:") type temp_REF.out # 2. Taking coordinates from sample image 1: display (image=sample1,frame=2,erase+,bord-, sele+,repe-,fill-,zscal+,ztrans="linear", >> "temp_junk.out") print (" ") print (" *** SAMPLE IMAGE 1: Currently displayed in 'Ximtool' ***") print (" *** Select *same* sample of stars ***") print (" ") print (" --> Use to select each star and type when done.") imexam(input=sample1,frame=2,image=sample1,keeplog-,defkey="a",autor+, allfram+,nfram=0,graphcu="",imagecu="",wcs="logical",graphic="stdgraph", display="display(image='$1',frame=$2)",use_dis+,flpar-, >> "temp_imexamSA1.out") fields (files="temp_imexamSA1.out",fields="1,2",lines="1-9999",quit_if-, print_f-,flpar-, >> "temp_SA1.out") fields (files="temp_imexamSA1.out",fields="11",lines="1-9999",quit_if-, print_f-,flpar-, >> "tshifts.FWHM") # 3. Taking coordinates from sample image 2: display (image=sample2,frame=3,erase+,bord-, sele+,repe-,fill-,zscal+,ztrans="linear", >> "temp_junk.out") print (" ") print (" *** SAMPLE IMAGE 2: Currently displayed in 'Ximtool' ***") print (" *** Select *same* sample of stars ***") print (" ") print (" --> Use to select each star and type when done.") imexam(input=sample2,frame=3,image=sample2,keeplog-,defkey="a",autor+, allfram+,nfram=0,graphcu="",imagecu="",wcs="logical",graphic="stdgraph", display="display(image='$1',frame=$2)",use_dis+,flpar-, >> "temp_imexamSA2.out") fields (files="temp_imexamSA2.out",fields="1,2",lines="1-9999",quit_if-, print_f-,flpar-, >> "temp_SA2.out") fields (files="temp_imexamSA2.out",fields="11",lines="1-9999",quit_if-, print_f-,flpar-, >> "tshifts.FWHM") # Joining coordinate lists side-by-side in the one file: joinlines(list1="temp_REF.out,temp_SA1.out,temp_SA2.out", list2="",output="temp_coords.out",delim="",missing="Missing",maxchar=300, shortes+,verb+,flpar-) print (" ") print ("- - - - - - - - - - - - - - - - - - - - - - - - - -") print (" Xoffset Yoffset (REF - SAMPLE 1) ") !awk '{print ($1-$3)" "($2-$4)}' temp_coords.out print ("- - - - - - - - - - - - - - - - - - - - - - - - - -") print (" Xoffset Yoffset (REF - SAMPLE 2) ") !awk '{print ($1-$5)" "($2-$6)}' temp_coords.out print ("- - - - - - - - - - - - - - - - - - - - - - - - - -") print (" ") print (" Done.") print (" ") # Cleaning-up: delete (files="temp_*.out",go_ahea+,ver-) end