# Modification history:  K. Kinemuchi  APO  1/6/2017
procedure aponew (img)
        string img {prompt="image"}
begin
	string s1
#Get parameter
	s1 = img
        delete("T"//s1)
#Make it real:
        imarith(s1//"[1:2048,1:2048]", "*", 0.0, "T"//s1)
        imcopy("TA"//s1,"T"//s1//"[1:1024,1:1024]")
        imcopy("TB"//s1,"T"//s1//"[1:1024,1024:2048]")
        imcopy("TC"//s1,"T"//s1//"[1024:2048,1:1024]")
        imcopy("TD"//s1,"T"//s1//"[1024:2048,1024:2048]")
        imdelete("TA"//s1)
        imdelete("TB"//s1)
        imdelete("TC"//s1)
        imdelete("TD"//s1)
end

# Note: the original version of this code was called y4knew.cl and came with Phil Massey's tarball of Y4KCam data reduction scripts.  The original version of this code can be downloaded from http://www2.lowell.edu/users/massey/obins/y4kcamred.html.