dmipy icon indicating copy to clipboard operation
dmipy copied to clipboard

Two compartment Multi-tissue MCMDI model

Open villalonreina opened this issue 3 years ago • 1 comments

Hi @matteofrigo @rutgerfick We are trying to follow this example: (https://nbviewer.jupyter.org/github/AthenaEPI/dmipy/blob/master/examples/example_multi_compartment_spherical_mean_technique.ipynb) but in the multi-tissue framework:

When trying to input the tissue responses we have tried with one tissue response:

mcdmi_mod = modeling_framework.MultiCompartmentSphericalMeanModel(models=[bundle], S0_tissue_responses=[S0_gm]))

Giving the following error:

TypeError: unsupported operand type(s) for -: 'list' and 'float'

We have also tried with two tissue responses:

mcdmi_mod = modeling_framework.MultiCompartmentSphericalMeanModel(models=[bundle], S0_tissue_responses=[S0_gm, S0_gm]))

But it also fails:

ValueError: Number of S0_tissue responses 2 must be same as number of input models 1.

What is the right way to do it?

Also, regarding this same example, how do you separate the zeppelin from the stick compartment out of BundleModel_1_partial_volume_0, which is one of the two estimated parameters of the model? Thanks!

villalonreina avatar Jan 24 '21 03:01 villalonreina

Hi @villalonreina ,

So the issue you are running into is pretty simple. In the first one, I'm actually not sure what is making the error but it makes no sense to set a single tissue response if there is only one model. This is because the single model will always be fit the signal by itself (i.e. the normalized tissue fraction will always be 1 by default). However, the models that are inside the bundle will still fit the the signal attenuation.

In the second, you are trying to give 2 tissue responses to a single model, which does not work, you have to give one per model.

to your question of the bundle partial volume, BundleModel_1_partial_volume_0 always corresponds to the first model you give when generating the Bundle model. (1- BundleModel_1_partial_volume_0) corresponds to the second model that is defined.

Cheers!

rutgerfick avatar Jan 25 '21 19:01 rutgerfick