function imgph = CJshear(img,phc0,phc1)
% This program has been created by Jean-Nicolas Dumez and Corentin Jacquemmoz, 
% CEISAM, CNRS, Université de Nantes, France
% The authors are not responsible for the results obtained with this program
% This program can be used, modified and shared as long as the authors are
% credited and the program is share under the same conditions
% Please do not delete this header from the file.
%
% Function used in the shear_gui to change the phase after fourier
% transform.
ftimg = fftshift(fft(fftshift(img)));

procwaxis = linspace(-0.5,0.5,size(img,1))';
c = pi/180;

ftimgph = ftimg .* exp(1i*c*(phc0 + phc1*(procwaxis)));
imgph = ifftshift(ifft(ifftshift(ftimgph)));

end