setIncPnts

Set the positions of the transmitters.

Contents

Syntax

seti = setIncPnts(seti)
seti = setIncPnts(seti,dispDepth)

Description

seti = setIncPnts(seti) sets the positions seti.incPnts of the transmitters in dependence of input in struct seti. The number of transmitters is stored in seti.incNb. The approximation of the infinitesimal element of closed contour with control points is stored in seti.dSInc.

seti = setIncPnts(seti,dispDepth) does the same but allows to control the displayed messages by dispDepth.

In case of 2D (seti.dim == 2)

In case of 3D (seti.dim == 3)

Example

Arrange 5 point sources on a circle with radius 3. Coordinates are stored in seti.incPnts.

init;
seti.dim = 2;
seti.incType = 'pointSource';
seti.incPntsType = 'circle';
seti.incNb = 5;
seti.radSrc = 3;
seti = setIncPnts(seti);

Input Arguments

Input Arguments in case of 2D (seti.dim = 2) and point sources (seti.incType = 'pointSource')

It follows a list of type-depending input parameters to describe the details of the geometry. The names are analog to the parameters in pntsGeometry.html (mostly with the prefix inc and a big letter, exceptions are marked with emphasized). Examples are in pntsGeometry.html. If these parameters are not set, default values are set automatically (see inside the code).

varargin in case of seti.incPntsType = 'manually'

varargin in case of seti.incPntsType = 'circle'

varargin in case of seti.incPntsType = 'square'

varargin in case of seti.incPntsType = 'line'

varargin in case of seti.incPntsType = 'borehole'

Input Arguments in case of 3D (seti.dim = 3)

It follows a list of type-depending input parameters to describe the details of the geometry. The names are analog to the parameters in pntsGeometry3D.html (mostly with the prefix inc and a big letter, exceptions are marked with emphasized). Examples are in pntsGeometry3D.html. If these parameters are not set, default values are set automatically (see inside the code).

varargin in case of seti.incPntsType = 'manually'

varargin in case of seti.incPntsType = 'sphereLatLon' or 'sphereFibo'

Optional Input Argument

Output Arguments

For further information see the corresponding parameters Pnts, Nb, and dS in pntsGeometry.html and pntsGeometry3D.html.

See Also

Code: function: setIncPnts

function seti = setIncPnts(seti,varargin)

if nargin == 2
    dispDepth = varargin{1};
else
    dispDepth = 0;
end

if seti.dim == 2

    seti = checkfield(seti,'incPntsType','circle',dispDepth); % default

    if strcmp(seti.incType,'planeWave')
        % currently only type circle
        [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry(seti,'circle',seti.incNb,1); % radSrc: 1

    elseif strcmp(seti.incType,'pointSource')
        switch seti.incPntsType
            case 'manually'
                [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry(seti,'manually',seti.incPnts);
            case 'circle'
                [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry(seti,'circle',seti.incNb,seti.radSrc);
            case 'square'
                seti = checkfield(seti,'incNbEdge',9);
                seti = checkfield(seti,'incEdgeLength',7);
                [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry(seti,'square',seti.incNbEdge,seti.incEdgeLength);
            case 'line'
                seti = checkfield(seti,'incNbLine',35);
                seti = checkfield(seti,'incLineLength',10);
                seti = checkfield(seti,'incLinePos',5);
                [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry(seti,'line',seti.incNbLine,seti.incLineLength,seti.incLinePos);
            case 'borehole'
                % For type 'borehole' options are the same for inc and meas Pnts.
                % Note the last input argument: inc or meas (to shift)
                seti = checkfield(seti,'boreNbLine',35);
                seti = checkfield(seti,'boreLineLength',500); % 100 seems to low and 1000 seems too high
                % boreLineLength = 500 does not result in a nice reconstruction; change it...
                seti = checkfield(seti,'boreLinePos',5);
                [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry(seti,'borehole',seti.boreNbLine,seti.boreLineLength,seti.boreLinePos,'inc');
            case 'twoBoreholes'
                % The options are similar to borehole
                % (now we have two line positions).
                seti = checkfield(seti,'boreNbLine',35);
                seti = checkfield(seti,'boreLineLength',500);
                seti = checkfield(seti,'boreLinePos1',5);
                seti = checkfield(seti,'boreLinePos2',-5);
                [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry(seti,'twoBoreholes',seti.boreNbLine,seti.boreLineLength,seti.boreLinePos1,seti.boreLinePos2,'inc');
            otherwise
                error('No valid incPntsType.')
        end

    else
        error('incType must be planeWave or pointSource.')
    end

elseif seti.dim == 3

    seti = checkfield(seti,'incPntsType','sphereFibo',dispDepth); % default
    % seti.incPntsMode = 'incFullSphere'; % old for sphereLatLon
    % sphereLatLon was default until August 2017.

    if strcmp(seti.incType,'planeWave')

        switch seti.incPntsType
            case 'sphereLatLon'
                [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry3D(seti,'sphereLatLon',seti.incNb,1,dispDepth);
            case 'sphereFibo'
                [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry3D(seti,'sphereFibo',seti.incNb,1,dispDepth);
            otherwise
                error('No valid incPntsType.')
        end

    elseif strcmp(seti.incType,'pointSource')

        switch seti.incPntsType
            case 'manually'
                [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry3D(seti,'manually',dispDepth);
            case 'sphereLatLon'
                [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry3D(seti,'sphereLatLon',seti.incNb,seti.radSrc,dispDepth);
            case 'sphereFibo'
                [seti.incPnts,seti.incNb,seti.dSInc] = pntsGeometry3D(seti,'sphereFibo',seti.incNb,seti.radSrc,dispDepth);
            otherwise
                error('No valid incPntsType.')
        end

    end

else
        disp('   Error: seti.dim is not equal to two or three.')
end

end