Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two compartment Multi-tissue MCMDI model #115

Open
villalonreina opened this issue Jan 24, 2021 · 1 comment
Open

Two compartment Multi-tissue MCMDI model #115

villalonreina opened this issue Jan 24, 2021 · 1 comment

Comments

@villalonreina
Copy link

villalonreina commented Jan 24, 2021

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!

@rutgerfick
Copy link
Collaborator

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants