eitcom / pyEIT

Python based toolkit for Electrical Impedance Tomography
Other
169 stars 96 forks source link

Allow Inhomogeneous Measurement Patterns (Accelerate) #88

Closed liubenyuan closed 1 year ago

liubenyuan commented 1 year ago

Previously, meas_mat is a 3-dimensional ndarray which represents the excitation id and the differential pairs [n, m]. What if we want to combine the differential pairs of adjacent (16 elctrodes, 13 measurements per exc) and opposite (16 electrodes, 12 measurements per exc) excitations?

This PR implements a vstacked version os meas_mat. Now meas_mat is a 2-dimensional array, of size n_meas x 3. Each column represents [n, m, exc_id].

The benefit of using this type of measurement matrix is that:

  1. it allows inhomogeneous excitation patterns of different number of measurements. Moreover, you could write your own customized measurement [n, m, exc_ids] easily.
  2. it allows fast implementation of subtract_row_vectorized and smear_nd and a much cleaner implementation of calculating jac, see the code accordingly.

The PR redesigns the measurement protocol meas_mat, #46