% This guide ist not used in the user guide.
% It shows a manually (user-defined) geometry for the algorithm paper (made for revision version).
%

init;
seti.dim = 2;

delta = 0.2; % relative noise level

% Set transmitters positions:
seti.incType = 'pointSource';
seti.incPntsType = 'circle';
seti.radSrc = 0.2;
seti.incNb = 200;
seti = setIncPnts(seti);

% Add noise to the transmitter positions:
noise = randn(size(seti.incPnts));
noise = noise/norm(noise,2)*norm(seti.incPnts,2)*delta;
Pnts = seti.incPnts + noise;
[Pnts,Nb,dS] = pntsGeometry(seti,'manually',Pnts);
seti.incPnts = Pnts;

% Set receivers positions:
seti.measType = 'nearField';
seti.measPntsType = 'circle';
seti.radMeas = 0.4;
seti.measNb = 200;
seti = setMeasPnts(seti);

% Add noise to the receiver positions:
noise = randn(size(seti.measPnts));
noise = noise/norm(noise,2)*norm(seti.measPnts,2)*delta;
Pnts = seti.measPnts + noise;
[Pnts,Nb,dS] = pntsGeometry(seti,'manually',Pnts);
seti.measPnts = Pnts;

% Plot:

figure(1);
clf;
hold on;
IP = seti.incPnts;
MP = seti.measPnts;
[~,rInc]  = cart2pol(IP(1,:),IP(2,:));
[~,rMeas] = cart2pol(MP(1,:),MP(2,:));
incMarkerSize = 30;
measMarkerSize = 7;
plot(IP(1,:),IP(2,:),'b.','MarkerSize',incMarkerSize);
plot(MP(1,:),MP(2,:),'rs','MarkerSize',measMarkerSize,'MarkerFaceColor','red');
clear IP MP;
factor = max(max(rInc),max(rMeas))*1.2;
axis(factor*[-1 1 -1 1]); axis square;
axis off; box off;
hold off;

% set(gca,'FontSize',20); axis square; print(1,'-depsc','guideExpSetupForAlgPaperMan.eps');