Checking FZJ-EIT data from a test board

There exist multiple hardware and software versions of the of the EIT system developed by Zimmermann et al. 2008 (http://iopscience.iop.org/article/10.1088/0957-0233/19/9/094010/meta). To check basic system function a test board was built with multiple resistors attached to for connectors each. Measurements can thus be validated against known electrical (ohmic) resistances.

At this point we only support 3-point data, i.e., data which uses two electrodes to inject current, and then uses all electrodes to measure the resulting potential distribution against system ground. Classical four-point configurations are then computed using superposition.

Required are two files: a data file (usually eit_data_mnu0.mat and a text file (usually resistor_check.dat containing the measurement configurations to extract, and the expected measurement resistances.

The resistor_check.dat file contains the four-point spreads to be imported from the measurement. This file is a text file with four columns (A, B, M, N), separated by spaces or tabs. Each line denotes one measurement and its expected resistance, the allowed variation, and its allow difference towards its reciprocal counterpart:

1   2   4   3   1000    1    20
4   3   2   1   1000    1    20
...

imports

import reda
import reda.utils.eit_fzj_utils as eit_fzj_utils
fig = eit_fzj_utils.check_resistor_board_measurements(
    'data_eit_fzj_check/eit_data_mnu0.mat',
    'data_eit_fzj_check/resistances.dat'
)
# this context manager executes all code within the given directory
with reda.CreateEnterDirectory('output_eit_fzj_check'):
    # The resulting matplotlib figure can now be plotted to visualize the
    # measurement data and the expected outcomes
    fig.savefig('eit_fzj_resistor_check.pdf')
Resistor-check for FZJ-EIT systems
/home/runner/.virtualenvs/reda/lib/python3.10/site-packages/reda/utils/eit_fzj_utils.py:192: FutureWarning: The 'delim_whitespace' keyword in pd.read_csv is deprecated and will be removed in a future version. Use ``sep='\s+'`` instead
  ref_data = pd.read_csv(
     a   b   m   n  expected_r  variation_r  variation_diffr
0    1   4   2   3         980           10               20
1    2   3   1   4         980           10               20
2    5   8   6   7        1200           10               20
3    6   7   5   8        1200           10               20
4    9  12  10  11        1450           10               20
5   10  11   9  12        1450           10               20
6   13  16  14  15        1660           10               20
7   14  15  13  16        1660           10               20
8   17  20  18  19        1750           10               20
9   18  19  17  20        1750           10               20
10  21  24  22  23        1960           10               20
11  22  23  21  24        1960           10               20
12  25  28  26  27        2160           10               20
13  26  27  25  28        2160           10               20
14  29  32  30  31        2370           10               20
15  30  31  29  32        2370           10               20
16  33  36  34  35        2630           10               20
17  34  35  33  36        2630           10               20
18  37  40  38  39        2930           10               20
19  38  39  37  40        2930           10               20
/home/runner/.virtualenvs/reda/lib/python3.10/site-packages/reda/importers/eit_version_2013.py:140: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
  df = pd.concat(dfl)
Constructing four-point measurements
Summary:
               a          b          m  ...            r     frequency        rpha
count  232.00000  232.00000  232.00000  ...   232.000000    232.000000  232.000000
mean     7.50000    9.50000    7.50000  ...  1317.964245   4999.444504  -10.974077
std      4.50973    4.50973    4.50973  ...   252.307820  10539.110294   23.327723
min      1.00000    3.00000    1.00000  ...   973.780054      0.100000 -118.841378
25%      4.25000    6.25000    4.25000  ...  1126.688413     14.705882   -8.896945
50%      7.50000    9.50000    7.50000  ...  1324.014577    200.000000   -0.544584
75%     10.75000   12.75000   10.75000  ...  1502.235327   3300.000000   -0.055741
max     14.00000   16.00000   14.00000  ...  1647.043890  45000.000000    2.065788

[8 rows x 7 columns]
      a   b   m   n  ...  rphadiff  expected_r  variation_r  variation_diffr
0     1   4   2   3  ...  0.665199         980           10               20
1     2   3   1   4  ...  0.665199         980           10               20
2     5   8   6   7  ...  0.059260        1200           10               20
3     6   7   5   8  ...  0.059260        1200           10               20
4     9  12  10  11  ... -0.032374        1450           10               20
..   ..  ..  ..  ..  ...       ...         ...          ...              ...
227   6   7   5   8  ... -1.378944        1200           10               20
228   9  12  10  11  ... -1.868188        1450           10               20
229  10  11   9  12  ... -1.868188        1450           10               20
230  13  16  14  15  ...  4.744505        1660           10               20
231  14  15  13  16  ...  4.744505        1660           10               20

[232 rows x 25 columns]
Checking measurement 0
['a', 'b', 'm', 'n']
row [  1   4   2   3 980  10  20]
    Measured R: 974.950501690493, Expected R: 980, Difference: 5.049498309507044
Checking measurement 1
['a', 'b', 'm', 'n']
row [  2   3   1   4 980  10  20]
    Measured R: 980.0207577112194, Expected R: 980, Difference: 0.020757711219403063
Checking measurement 2
['a', 'b', 'm', 'n']
row [   5    8    6    7 1200   10   20]
    Measured R: 1195.4078777741822, Expected R: 1200, Difference: 4.592122225817775
Checking measurement 3
['a', 'b', 'm', 'n']
row [   6    7    5    8 1200   10   20]
    Measured R: 1201.1783524216607, Expected R: 1200, Difference: 1.1783524216607475
Checking measurement 4
['a', 'b', 'm', 'n']
row [   9   12   10   11 1450   10   20]
    Measured R: 1451.2612696379833, Expected R: 1450, Difference: 1.2612696379833324
Checking measurement 5
['a', 'b', 'm', 'n']
row [  10   11    9   12 1450   10   20]
    Measured R: 1457.1126099162689, Expected R: 1450, Difference: 7.112609916268866
Checking measurement 6
['a', 'b', 'm', 'n']
row [  13   16   14   15 1660   10   20]
    Measured R: 1645.6294195124026, Expected R: 1660, Difference: 14.370580487597408
     not passing [  13   16   14   15 1660   10   20]
     1650 1670
     1645.6294195124026
Checking measurement 7
['a', 'b', 'm', 'n']
row [  14   15   13   16 1660   10   20]
    Measured R: 1639.1936755757426, Expected R: 1660, Difference: 20.806324424257355
     not passing [  14   15   13   16 1660   10   20]
     1650 1670
     1639.1936755757426
Checking measurement 8
['a', 'b', 'm', 'n']
row [  17   20   18   19 1750   10   20]
Checking measurement 9
['a', 'b', 'm', 'n']
row [  18   19   17   20 1750   10   20]
Checking measurement 10
['a', 'b', 'm', 'n']
row [  21   24   22   23 1960   10   20]
Checking measurement 11
['a', 'b', 'm', 'n']
row [  22   23   21   24 1960   10   20]
Checking measurement 12
['a', 'b', 'm', 'n']
row [  25   28   26   27 2160   10   20]
Checking measurement 13
['a', 'b', 'm', 'n']
row [  26   27   25   28 2160   10   20]
Checking measurement 14
['a', 'b', 'm', 'n']
row [  29   32   30   31 2370   10   20]
Checking measurement 15
['a', 'b', 'm', 'n']
row [  30   31   29   32 2370   10   20]
Checking measurement 16
['a', 'b', 'm', 'n']
row [  33   36   34   35 2630   10   20]
Checking measurement 17
['a', 'b', 'm', 'n']
row [  34   35   33   36 2630   10   20]
Checking measurement 18
['a', 'b', 'm', 'n']
row [  37   40   38   39 2930   10   20]
Checking measurement 19
['a', 'b', 'm', 'n']
row [  38   39   37   40 2930   10   20]

Gallery generated by Sphinx-Gallery