From e379257c21ca965c5607edf33bc914f39c7e5856 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lisa=20Sch=C3=A4tzle?= <lisa.schaetzle@kit.edu>
Date: Thu, 11 Jan 2024 09:12:22 +0000
Subject: [PATCH] Update projOp.m

---
 src/projOp.m | 47 ++++++++++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 19 deletions(-)

diff --git a/src/projOp.m b/src/projOp.m
index c4d3d01..6db1dfb 100644
--- a/src/projOp.m
+++ b/src/projOp.m
@@ -1,19 +1,28 @@
-function [F] = projOp(F, sampling, kappa, c1, c2, N1, N2)
-% Projection of F onto the subspace $T_{c_1,c_2}^\astV_{N_1,N_2}$
-% c_1 indicates shift in row direction, c_2 in column direction
-% N_1 is cutting parameter in row direction, N_2 in column direction
-
-F = translOp(F, sampling, c1, c2, kappa); % shift the origin
-
-Ffft = fft2(F);
-% Ffft = fft(F.'); % columnwise 1D FT
-
-Ffft(:,(N1+2) : (end-N1)) = 0;
-Ffft((N2+2) : (end-N2),:) = 0;
-
-F = ifft2(Ffft);
-% F = ifft(Ffft).'; % columnwise 1d IFT
-
-F = translOp(F, sampling, -c1, -c2, kappa); % shift back the origin
-
-end
\ No newline at end of file
+function [Ft] = projOp(F, sampling, kappa, c1, c2, N1, N2)
+
+% Simulates projection operator on generalized subspace of non-evanescent far field operators.
+% Projects of F onto the subspace $T_{c_1,c_2}^\astV_{N_1,N_2}$.
+%
+% INPUT:    F           Far field matrix, nxhat*nd-array.
+%           sampling    Structure containing information about the discretization.
+%           kappa       Wave number, >0.
+%           c1          Determines translation in row direction, vector of length 2.
+%           c2          Determines translation in column direction, vector of length 2.
+%           N1          Cutting index in row direction, natural number.
+%           N2          Cutting index in column direction, natural number.
+% OUTPUT:   Fp      Projected far field matrix, nxhat*nd-array.
+% 
+% *********************************************************************************************
+
+F = translOp(F, sampling, c1, c2, kappa); % shift the origin
+
+Ffft = fft2(F);
+
+Ffft(:,(N1+2) : (end-N1)) = 0;
+Ffft((N2+2) : (end-N2),:) = 0;
+
+F = ifft2(Ffft);
+
+Fp = translOp(F, sampling, -c1, -c2, kappa); % shift back the origin
+
+end
-- 
GitLab