open-discussion > RE: Matrix Singularity Preventing Conductance
Feb 10, 2022  02:02 PM | Iman Aganj - Harvard Medical School / Massachusetts General Hospital
RE: Matrix Singularity Preventing Conductance
Hi Corey,

Apologies for the delay in responding to your message.

Matrix singularity may happen when the (masked) image contains disconnected subregions, i.e. islands surrounded by zero tensors. The best way to avoid this is to make sure that, after masking, the image remains a single connected component. Alternatively, one could use a "soft" mask, i.e. instead of setting the out-of-mask tensors to 0, multiply them by a small positive number (e.g. 0.0001).

Please don't hesitate to let us know if this fixes the issue or not.

Best,
Iman

Originally posted by Corey Ratcliffe:
Hi, I'm having trouble configuring this toolbox to work with my data. It appears that somewhere in the pipeline, a matrix is being evaluated and returning an error.

Warning: Matrix is singular to working precision.
> In solvePDE (line 23)
In computePotentials3D (line 29)
In run_conductance_example_data (line 38)

The pipeline seems to have this issue with any data is run through it, including the fibrecup 3D example. A colleague is experiencing the same error. When run through a batch command in bash, this warning causes the fa map to generate, but the conductance map remains at 0 across the image. When run from the MATLAB terminal, the script continuously re-evaluates the above message. With smaller subsets of the image it complete, however the largest section this has worked for thus far is 30*62*2.

The script seems particularly prone to throw the error when the ventricles are masked off, but I've not tested this extensively.

Is this an issue that has been seen before? If so, is there any way to treat the input data to avoid this? I understand matrix singularity is data-based.

Kind regards,
Corey

Threaded View

TitleAuthorDate
Corey Ratcliffe Sep 28, 2021
RE: Matrix Singularity Preventing Conductance
Iman Aganj Feb 10, 2022