1 ## Copyright (C) 2015 Loriane Weber
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 3 of the License, or
6 ## (at your option) any later version.
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
13 ## You should have received a copy of the GNU General Public License
14 ## along with Octave; see the file COPYING. If not, see
15 ## <http://www.gnu.org/licenses/>.
19 ## Author: Loriane Weber <lweber@hpc2-0601>
20 ## Created: 2015-07-01
23 function [FrIm] = FresnelTransform_1D(ph, B, D, lambda, oversamp, ftot)
26 u = exp(-B).*exp(+i*ph);
29 Pd = exp(-i*pi*lambda*D*(ftot.^2));
31 ud = ones(size(ftot, 1), 1);
34 ud= ifft( fft(ud).*Pd );
40 Idd = conv2(FrIm,ipf,'same')./conv2(ones(size(FrIm)),ipf,'same');
41 Idd = Idd(oversamp:oversamp:end, :);
44 ipf = [0.5 1 1 1 0.5 ];
45 Idd = conv2(FrIm,ipf,'same')./conv2(ones(size(FrIm)),ipf,'same');
46 Idd = Idd(oversamp:oversamp:end, :);
48 %ipf = [0.5 1 0.5]; % modelise le binning du detecteur
49 %Idd = conv(Idd,ipf,'same')./conv(ones(size(Idd)),ipf,'same');