def rotate(self, phi=0, rotateGrid=False, method='linear'):