Inverse problem functions - Data-Acquisition-and-Processing-Lab/ECTsim GitHub Wiki

clearFields

Function to remove specified fields from structures to reduce their memory usage.

Usage: model = clearFields(model, nestedFieldsToRemove);

  • model - A cell array containing model names as strings (e.g., {'model1', 'model2'}).
  • nestedFieldsToRemove - A cell array containing nested field names to be removed (e.g., {'qt.vt', 'dd'}).

defineMeshInvp

Distributes points (pixels) over the workspace and creates two matrices, X and Y, which store the x and y coordinates representing the grid. The input values are the number of points spread along the width and height of the workspace.

Usage: [model] = defineMeshInvp(model, widthPoints, heightPoints, depthPoints);

  • model - Structure with a numerical model description.
  • widthPoints - Mesh width.
  • heightPoints - Mesh height.
  • depthPoints - Mesh depth (optional, for 3D).

downscaleModel

Interpolates a model to a coarser mesh used in the inverse problem. This process involves decimation and sensitivity adjustment for the complex permittivity distribution within the model.

Usage: [model] = downscaleModel(mesh, model);

  • mesh - Inverse problem mesh.
  • model - Structure with a numerical model description.

findIndexInvp

Finds indices in a coarse mesh for the inverse problem.

Usage: [Index] = findIndexInvp(modelInvp, element_name);

  • modelInvp - Structure with a numerical model description.
  • element_name - Name of the element.

Landweber

Performs the Landweber iterative algorithm.

Usage: [invp] = Landweber(invp, maxiter, alpha);

  • invp - Structure with an inverse model description.
  • maxiter - Maximum number of iterations.
  • alpha - Relaxation factor.

LBP

Performs the Linear Back-Projection algorithm.

Usage: [invp] = LBP(invp);

  • invp - Structure with an inverse model description.

PINV

Performs the Moore–Penrose pseudoinverse operation.

Usage: [invp] = PINV(invp);

  • invp - Structure with an inverse model description.
  • tol - Damping parameter value (optional).

semiLM

Performs the semilinear Levenberg-Marquardt algorithm.

Usage: [invp] = semiLM(invp, maxiter, alpha, lambda, maxUpdate);

  • invp - Structure with an inverse model description.
  • maxiter - Maximum number of iterations.
  • alpha - Relaxation factor.
  • lambda - Damping parameter value.
  • maxUpdate - Maximum number of sensitivity matrix updates.

upscaleModel

Interpolates the permittivity map to a finer qt mesh. This function requires the expansion of FOV data (extrapolating at FOV's edges).

Usage: [model] = upscaleModel(eps_map, model);

  • eps_map - Permivitity map from an inverse problem mesh.
  • model - Structure with a numerical model description.

withoutRepetition

Converts sensitivity matrices from 'all measurements' to 'without repetitions', reducing the number of rows in the sensitivity matrix by half.

Usage: [model] = WithoutRepetition(model, modelList);

  • model - Vector with application electrode numbers.
  • modelList - List of matrices to convert; example matrices include {min, max, pha}.