setMeasPnts

Set the positions of the receivers.

Contents

Syntax

seti = setMeasPnts(seti)
seti = setMeasPnts(seti,dispDepth)

Description

seti = setMeasPnts(seti) set the positions seti.measPnts of the receivers in dependence of input in struct seti. The number of receivers is stored in seti.measNb. The approximation of the infinitesimal element of closed contour with control points is stored in seti.dSMeas.

seti = setMeasPnts(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.measType = 'nearField';
seti.measPntsType = 'circle';
seti.measNb = 5;
seti.radMeas = 3;
seti = setMeasPnts(seti);

Input Arguments

Input Arguments in case of 2D (seti.dim = 2) and near field (seti.incType = 'nearField')

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 meas 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.measPntsType = 'manually'

varargin in case of seti.measPntsType = 'circle'

varargin in case of seti.measPntsType = 'square'

varargin in case of seti.measPntsType = 'line'

varargin in case of seti.measPntsType = 'borehole'

Note: Option 'borehole' is only useful if seti.incPntsType is also 'borhole'.

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 meas 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.measPntsType = 'manually'

varargin in case of seti.measPntsType = '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 = setMeasPnts(seti,varargin)

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

if seti.dim == 2

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

    % incPntsType and measPntsType must be the same in case of borehole
    if isfield(seti,'incPntsType') && strcmp(seti.incPntsType,'borehole')
        seti.measPntsType = 'borehole';
        setmessage(seti,'measPntsType');
    end

    if strcmp(seti.measType,'farField')
        % currently only circle case... makes sense...
        [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry(seti,'circle',seti.measNb,1); % radMeas: 1

    elseif strcmp(seti.measType,'nearField')
        switch seti.measPntsType
            case 'manually'
                [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry(seti,'manually',seti.measPnts);
            case 'circle'
                [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry(seti,'circle',seti.measNb,seti.radMeas);
            case 'square'
                seti = checkfield(seti,'measNbEdge',9);
                seti = checkfield(seti,'measEdgeLength',7);
                [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry(seti,'square',seti.measNbEdge,seti.measEdgeLength);
            case 'line'
                seti = checkfield(seti,'measNbLine',35);
                seti = checkfield(seti,'measLineLength',10);
                seti = checkfield(seti,'measLinePos',-5);
                [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry(seti,'line',seti.measNbLine,seti.measLineLength,seti.measLinePos);
            case 'borehole'
                % checkfield is in setIncPnts: use the same for inc and meas Pnts
                [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry(seti,'borehole',seti.boreNbLine,seti.boreLineLength,seti.boreLinePos,'meas');
            case 'twoBoreholes'
                % The options are similar to borehole
                % (now we have two line positions).
                [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry(seti,'twoBoreholes',seti.boreNbLine,seti.boreLineLength,seti.boreLinePos1,seti.boreLinePos2,'meas');
            otherwise
                error('No valid measPntsType.')
        end

    else
        error('measType must be farField or nearField.')
    end

elseif seti.dim == 3

    seti = checkfield(seti,'measPntsType','sphereFibo',dispDepth); % default
    % seti.measPntsMode = 'scattFullSphere'; % old for sphereLatLon
    % sphereLatLon was default until August 2017.

    if strcmp(seti.measType,'farField')
        % currently only type sphere (longiute-latitude or Fibonacci)
        switch seti.measPntsType
            case 'sphereLatLon'
                [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry3D(seti,'sphereLatLon',seti.measNb,1,dispDepth);
            case 'sphereFibo'
                [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry3D(seti,'sphereFibo',seti.measNb,1,dispDepth);
            otherwise
                error('No valid measPntsType.')
        end

    elseif strcmp(seti.measType,'nearField')

        switch seti.measPntsType
            case 'manually'
                [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry3D(seti,'manually',dispDepth);
            case 'sphereLatLon'
                [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry3D(seti,'sphereLatLon',seti.measNb,seti.radMeas,dispDepth);
            case 'sphereFibo'
                [seti.measPnts,seti.measNb,seti.dSMeas] = pntsGeometry3D(seti,'sphereFibo',seti.measNb,seti.radMeas,dispDepth);
            otherwise
                error('No valid incPntsType.')
        end

    end

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