code for Voigts & Harnett, Somatic and dendritic encoding of spatial variables in retrosplenial cortex differs during 2-D navigation
[I_ur, I_mask] = derotate_image(I,line_angles,rot_center);
Derotates image that has been line-scanned top to bottom. I: Input image line_angles: rotation angles for each image line rot_center: center of the rotation