public void setXYwrap(boolean xwr, boolean ywr){xwrap = xwr; ywrap = ywr; 
					int xpol; if(xwr){xpol = 1;}else{xpol = 0;}
					int ypol; if(ywr){ypol = 1;}else{ypol = 0;}
					borpol[2] = xpol; borpol[6] = xpol;
					borpol[0] = ypol; borpol[4] = ypol;
					if(xwr && ywr){borpol[1] = 1; borpol[3] = 1; borpol[5] = 1; borpol[7] = 1;}
					else{borpol[1] = 0; borpol[3] = 0; borpol[5] = 0; borpol[7] = 0;}
				if(aamode == 1){pete.setWrap("X", xwr); pete.setWrap("Y", ywr);}
				}