Closed StefaniaOliviero closed 3 years ago
Hi Stefania,
For completeness sake I provide my answers also here on Github:
To answer your questions:
when you add models to the folder .mdt/.../components/user/composite_models it will be picked up next time you start MDT. If you are using the GUI you have to restart it, if you are using iPython you have to reload the MDT library, if you are using command line it should just pick it up. Typically, if it doesn't pick it up there is something wrong with the model.
MDT was originally based on the premise of multi-compartment models for modelling diffusion MRI signal. As such, the basic components in MDT are "compartments" which, when defined, can be freely mixed into (multi-compartment) models. The compartments were initially items such as "Tensor", "Ball", "Cylinder", "Stick" etc., following the definitions from Basser, Zhang and other early dMRI modellers. Later scientific work experimented with T1 and T2 decay in the dMRI models. Adding this to MDT was easy by defining T1 and T2 decays as additional "compartments", and mixing these in with the multi-compartment models. This works, although at the expense of naming clarity, since T1 and T2 decays are not compartments as defined in multi-compartment dMRI models.
To give an example, the ActiveAx model is defined as such:
model_expression = ''' S0 ((Weight(w_csf) Ball) + (Weight(w_ic) CylinderGPD) + (Weight(w_ec) Zeppelin)) '''
Meaning we have the Ball, CylinderGPD and Zeppelin compartments (these are well-defined dMRI compartments) mixed together using weights and S0 for the unweighted signal.
If you want to add T1 decay to that, you could change it to:
model_expression = ''' S0 ExpT1DecTM_simple ((Weight(w_csf) Ball) + (Weight(w_ic) CylinderGPD) + (Weight(w_ec) * Zeppelin)) '''
And voila, you have T1 decay in the ActiveAx model.
Have a look at the file ".mdt/
The decay constants are adding as an additional free parameter. These can be fixed using provided methods. Please see the documentation for that.
Best,
Robbert
Dear Robbert, I am composing a new model, by adding the description of my model in a file .py in the folder .mdt/1.2.6/components/user/composite_models. I need to know some things: 1) once I did this, what else have I to do to make my new model available? 2) In modeling the signal I would like to introduce the T1 or T2 decay: I found that in the model TimeDependentActiveAx, (maybe) such dependence appears in the function "ExpT1DecTM_simple": where is the description of such a function? 3) In the file free.py, in the folder .mdt/1.2.6/components/standard/parameters, there is the description of T1: class T1(FreeParameterTemplate):
How does the ScaleTransform mean? Which is the unit, s*10(-4))? For example, a T1 of 500 ms is in the described range?
Thanks a lot for your precious answers.