Skip to content
Snippets Groups Projects
Commit 77a18416 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

PSF: increased PSF application performance

parent e795ea11
No related branches found
No related tags found
No related merge requests found
......@@ -135,8 +135,8 @@ classdef GtPSF < handle
otf = fft(otf, [], 1);
otf = fft(otf, [], 3);
otf = fftshift(otf, 1);
otf = fftshift(otf, 3);
% otf = fftshift(otf, 1);
% otf = fftshift(otf, 3);
end
function init_otfs(self)
......@@ -186,8 +186,8 @@ classdef GtPSF < handle
imgs = fft(imgs, [], 1);
imgs = fft(imgs, [], 3);
imgs = fftshift(imgs, 1);
imgs = fftshift(imgs, 3);
% imgs = fftshift(imgs, 1);
% imgs = fftshift(imgs, 3);
if (is_direct || self.is_symmetric)
imgs = bsxfun(@times, imgs, self.otf_direct);
......@@ -195,17 +195,17 @@ classdef GtPSF < handle
imgs = bsxfun(@times, imgs, self.otf_adjoint);
end
imgs = ifftshift(imgs, 1);
imgs = ifftshift(imgs, 3);
% imgs = ifftshift(imgs, 1);
% imgs = ifftshift(imgs, 3);
imgs = ifft(imgs, [], 1);
imgs = ifft(imgs, [], 3);
imgs = real(imgs);
imgs = fftshift(imgs, 1);
imgs = fftshift(imgs, 3);
imgs = real(imgs);
imgs = imgs((self.otf_padding+1):(end-self.otf_padding), :, ...
(self.otf_padding+1):(end-self.otf_padding));
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment