# Modification history:  K. Kinemuchi  APO  1/6/2017
procedure apotproc (img)
        string img {prompt="image"}
begin
	string s1

#Get parameter
	s1 = img

delete("TA"//s1)
delete("TB"//s1)
delete("TC"//s1)
delete("TD"//s1)
colbias("A"//s1,"TA"//s1,trim="[1:1024,1:1024]",bias="[1025:1049,1:1024]",interact-,function="spline3",order=15,nit=0)

colbias("B"//s1,"TB"//s1,trim="[1:1024,1:1024]",bias="[1025:1049,1:1024]",interact-,function="spline3",order=15,nit=0)

colbias("C"//s1,"TC"//s1,trim="[26:1049,1:1024]",bias="[1:25,1:1024]",interact-,function="spline3",order=15,nit=0)

colbias("D"//s1,"TD"//s1,trim="[26:1049,1:1024]",bias="[1:25,1:1024]",interact-,function="spline3",order=15,nit=0)

delete("A"//s1)
delete("B"//s1)
delete("C"//s1)
delete("D"//s1)
end

# Note: the original version of this code was called y4ktproc.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.