I was wrong - the aips code is correct. It did the cos(dec) to deal with the header Xshift and Yshift which are different in form from the user input shifts. But note that it adds previous shifts to give you a new total shift. Eric