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@gpid16a-1801>
20 ## Created: 2015-11-20
22 function [ Id ] = CTFPropagation_1D (ph, B, D, lambda, oversamp, ftot)
31 %% propagators in 1D (sin and cos)
32 ssq=2*ssquare1(lambda*D, ftot, 1)';
33 csq=2*csquare1(lambda*D, ftot, 1)';
36 tmp_ph=zeros(2*mp, 1);
44 tmp_Id=-csq.*tmp_B + ssq.*tmp_ph;
45 tmp_Id=1+real(ifft(tmp_Id));
51 ipf = [0.5 1 0.5]; % modelise le binning du detecteur
52 Idd = conv(Id,ipf,'same')./conv(ones(size(Id)),ipf,'same');
53 Idd = Idd(oversamp:oversamp:end, :);
56 ipf = [0.5 1.0 1.0 1.0 0.5]; % modelise le binning du detecteur
57 Idd = conv(Id,ipf,'same')./conv(ones(size(Id)),ipf,'same');
58 Idd = Idd(oversamp:oversamp:end, :);