readRAWData

Reads the raw data from Institute Fresnel (1st and 2nd opus).

Contents

Syntax

[uTotRX, uIncRX, frequencies, rTX, nTX, rRX, nRX] = readRAWData(filename)

Description

[uTotRX, uIncRX, frequencies, rTX, nTX, rRX, nRX] = readRAWData(filename)

How to get experimental data from Institute Fresnel

Overview of available experimental data is given in:

http://www.fresnel.fr/3Ddatabase/database.php (Accessed: 20160921).

First opus

The corresponding article is [1].

  1. Open http://dx.doi.org/10.1088/0266-5611/17/6/301 (Accessed: 20160921).
  2. Klick on "Supplementary Data".
  3. Download the experimental data: *.exp-files.
  4. Save them in inexpdata/fresnel_opus_1.

Second opus

The corresponding article is [2].

  1. Open http://dx.doi.org/10.1088/0266-5611/21/6/S09 (Accessed: 20160921).
  2. Klick on "Supplementary Data".
  3. Download the experimental data: *.exp-files.
  4. Save them in inexpdata/fresnel_opus_2.

Example

Make sure that the file twodielTM_8f.exp is in the folder inexpdata/fresnel_opus_1.

A description how to do this is given in the section "How to get..." in the part "First opus" above.

Make sure that you are currently in the folder proc/expData.

filename = '../../inexpdata/fresnel_opus_1/twodielTM_8f.exp';
[uTotRX, uIncRX, frequencies, rTX, nTX, rRX, nRX] = readRAWData(filename);

This example reads the experimental data from twodielTM_8f.exp.

It provides experimental data of two dielectric cylinders. See incontrastsRef.html and [1] for details.

Input Arguments

Output Arguments

More About

Fixed settings for Fresnel data

See also fresnel.html, checkConsisExpData.html

References

See Also

Code

function [uTotRX, uIncRX, frequencies, rTX, nTX, rRX, nRX] = readRAWData(filename)

dataType = whichData(filename);
rawData = importdata(filename, ' ', 10);
rawData = rawData.data;

% Distances in meters
if regexpi(dataType, 'fresnel_opus_1')
    rTX = 0.72;
    rRX = 0.76;
end
if regexpi(dataType, 'fresnel_opus_2_45deg|fresnel_opus_2_20deg')
    rTX = 1.67;
    rRX = 1.67;
end

% Number of transmitters and receivers  (angular steps in degrees)
if regexpi(dataType, 'fresnel_opus_1')
    nTX = 36; % (10 degrees)
    nRX = 72; % (5 degrees)
end
if regexpi(dataType, 'fresnel_opus_2_45deg')
    nTX = 8; % (45 degrees)
    nRX = 360; % (1 degree)
end
if regexpi(dataType, 'fresnel_opus_2_20deg')
    nTX = 18; % (20 degrees)
    nRX = 360; % (1 degree)
end

% Frequencies (in Hz) (convert GHz in Hz)
frequencies = sort(unique(rawData(:,3)))*1E9;

% Total and incident field at reveivers points
nf = length(frequencies);
uTotRX = NaN(nRX,nTX,nf); % total field
uIncRX = NaN(nRX,nTX,nf); % incident field

for i = 1:size(rawData,1)
    t = rawData(i,:);
    iTX   = t(1);
    iRX   = t(2);
    iFreq = find(frequencies == t(3)*1E9);

    uTotRX(iRX,iTX,iFreq) =  t(4)+1i*t(5);
    uIncRX(iRX,iTX,iFreq) =  t(6)+1i*t(7);
end

end

function type = whichData(filename)
if ~isempty(regexpi(filename,strcat('dielTM_dec4f.exp|dielTM_dec8f.exp|',...
        'rectTE_8f.exp|rectTM_cent.exp|rectTM_dece.exp|twodielTM_4f.exp|',...
        'twodielTM_8f.exp|uTM_shaped.exp')))
    type = 'fresnel_opus_1';
end
if ~isempty(regexpi(filename,strcat('FoamDielExtTE.exp|FoamDielExtTM.exp|',...
        'FoamDielIntTE.exp|FoamDielIntTM.exp|')))
    type = 'fresnel_opus_2_45deg';
end
if ~isempty(regexpi(filename,strcat('FoamMetExtTE.exp|',...
        'FoamMetExtTM.exp|FoamTwinDielTE.exp|FoamTwinDielTM.exp')))
    type = 'fresnel_opus_2_20deg';
end
end