Reconstruction of the diffusion signal with the correlation tensor model#

Correlation Tensor MRI (CTI) is a method that uses double diffusion encoding data to resolve sources of kurtosis. It is similar to the Q-space Trajectory Imaging method (see Reconstruct with Q-space Trajectory Imaging (QTI)) [NetoHe2020]. However, in addition to the kurtosis sources associated with diffusion variance across compartments (K_aniso and K_iso, which are related to microscopic anisotropy and the variance of the mean diffusivities of compartments, respectively), CTI also measures K_micro. This quantifies non-Gaussian diffusion effects that deviate from the multiple Gaussian component tissue representation, such as restricted diffusion, exchange, and structural disorder in compartments like cross-sectional variance [NovelloL2022] [AlvesR2022].

Although the CorrelationTensorModel and the DiffusionKurtosisTensorFit may share some similarities, they have significantly different representations for the diffusion-weighted signal. This difference leads to the necessity for a unique design matrix specifically for CTI. The CorrelationTensorModel expresses the diffusion-weighted signal as:

\[\begin{align} \log E_{\Delta}(q_1, q_2) &= \left(q_{1i}q_{1j} + q_{2i}q_{2j}\right) \Delta D_{ij} \ &+ q_{1i}q_{2j}Q_{ij} \ &+ \frac{1}{6} \left( q_{1i}q_{1j}q_{1k}q_{1l} + q_{2i}q_{2j}q_{2k}q_{2l} \right) \ &\quad \times \Delta^2 D^2 W_{ijkl} \ &+ \frac{1}{4} q_{1i}q_{1j}q_{2k}q_{2l}Z_{ijkl} \ &+ \frac{1}{6} \left( q_{1i}q_{1j}q_{1k}q_{2l} + q_{2i}q_{2j}q_{2k}q_{1l} \right) S_{ijkl} \ &+ O(q^6) \end{align}\]

where: \(\Delta D_{ij}\) refers to the elements of the total diffusion tensor (DT) and \(W_{ijkl}\) are the elements of the total kurtosis tensor (KT) and \(D\) is the mean diffusivity and \(Q_{ij}\) are the elements of a 2nd order correlation tensor Q. \(Z_{ijkl}\) and \(S_{ijkl}\) are the elements of the 4th order displacement correlation tensors Z and S, respectively.

However it differentiates from the DiffusionKurtosis Model by calculating the different sources of kurtosis.

In the following example we show how to fit the correlation tensor model on a real life dataset and how to estimate correlation tensor based statistics.

First, we’ll import all relevant modules.

import matplotlib.pyplot as plt

import dipy.reconst.cti as cti
from dipy.io import read_bvals_bvecs
from dipy.core.gradients import gradient_table
from dipy.io.image import load_nifti
from dipy.data import get_fnames

For CTI analysis, data must be acquired using double diffusion encoding, taking into account different pairs of b-values and gradient directions between the two diffusion epochs, as discussed by Henriques et al. in Magn Reson Med 2021 [NetoHe2021]._ To run CTI we need to have separate b-value and b-vector files for each DDE diffusion epoch. In this tutorial, a sample DDE dataset and respective b-value and b-vector files for the two epochs are fetched. If you want to process your own DDE data compatible with CTI, you will have to change the below lines of code to add the paths of your data. The users should also ensure that the data is formatted correctly for the CTI analysis they are performing.

fdata, fbvals1, fbvecs1, fbvals2, fbvecs2, fmask = get_fnames('cti_rat1')
data, affine = load_nifti(fdata)
bvals1, bvecs1 = read_bvals_bvecs(fbvals1, fbvecs1)
bvals2, bvecs2 = read_bvals_bvecs(fbvals2, fbvecs2)
  0%|                                                                                                                            | 0/9317 [00:00<?, ? MB/s]
  0%|                                                                                                                    | 1/9317 [00:00<16:46,  9.26 MB/s]
  0%|                                                                                                                    | 4/9317 [00:00<08:02, 19.31 MB/s]
  0%|                                                                                                                    | 8/9317 [00:00<05:31, 28.10 MB/s]
  0%|▏                                                                                                                  | 17/9317 [00:00<03:11, 48.62 MB/s]
  0%|▍                                                                                                                  | 33/9317 [00:00<01:51, 83.48 MB/s]
  1%|▊                                                                                                                 | 66/9317 [00:00<01:01, 151.38 MB/s]
  1%|█▌                                                                                                               | 129/9317 [00:00<00:31, 288.26 MB/s]
  3%|██▉                                                                                                              | 238/9317 [00:00<00:18, 479.75 MB/s]
  3%|███▍                                                                                                             | 285/9317 [00:01<00:18, 476.48 MB/s]
  5%|█████▎                                                                                                           | 436/9317 [00:01<00:12, 736.68 MB/s]
  5%|██████▏                                                                                                          | 509/9317 [00:01<00:12, 703.42 MB/s]
  8%|████████▌                                                                                                       | 712/9317 [00:01<00:08, 1069.26 MB/s]
  9%|█████████▉                                                                                                      | 830/9317 [00:01<00:08, 1053.24 MB/s]
 10%|███████████▍                                                                                                    | 948/9317 [00:01<00:08, 1042.25 MB/s]
 11%|████████████▋                                                                                                  | 1067/9317 [00:01<00:08, 1028.05 MB/s]
 13%|██████████████▏                                                                                                | 1188/9317 [00:01<00:07, 1026.30 MB/s]
 14%|███████████████▌                                                                                                | 1292/9317 [00:02<00:17, 469.50 MB/s]
 15%|████████████████▍                                                                                               | 1371/9317 [00:02<00:16, 493.27 MB/s]
 16%|█████████████████▍                                                                                              | 1455/9317 [00:02<00:14, 540.86 MB/s]
 16%|██████████████████▍                                                                                             | 1529/9317 [00:02<00:13, 578.90 MB/s]
 17%|███████████████████▎                                                                                            | 1603/9317 [00:02<00:12, 610.87 MB/s]
 18%|████████████████████▏                                                                                           | 1681/9317 [00:02<00:11, 644.51 MB/s]
 19%|█████████████████████▎                                                                                          | 1768/9317 [00:03<00:11, 680.34 MB/s]
 20%|██████████████████████▎                                                                                         | 1855/9317 [00:03<00:10, 729.00 MB/s]
 21%|███████████████████████▎                                                                                        | 1944/9317 [00:03<00:09, 747.55 MB/s]
 22%|████████████████████████▍                                                                                       | 2035/9317 [00:03<00:09, 762.53 MB/s]
 23%|█████████████████████████▌                                                                                      | 2124/9317 [00:03<00:09, 772.38 MB/s]
 24%|██████████████████████████▋                                                                                     | 2216/9317 [00:03<00:09, 788.45 MB/s]
 25%|███████████████████████████▋                                                                                    | 2308/9317 [00:03<00:08, 798.77 MB/s]
 26%|████████████████████████████▊                                                                                   | 2399/9317 [00:03<00:08, 825.64 MB/s]
 27%|█████████████████████████████▉                                                                                  | 2490/9317 [00:03<00:08, 820.92 MB/s]
 28%|███████████████████████████████                                                                                 | 2584/9317 [00:04<00:08, 826.76 MB/s]
 29%|████████████████████████████████▏                                                                               | 2677/9317 [00:04<00:07, 851.10 MB/s]
 30%|█████████████████████████████████▏                                                                              | 2763/9317 [00:04<00:07, 848.47 MB/s]
 31%|██████████████████████████████████▏                                                                             | 2849/9317 [00:04<00:07, 823.34 MB/s]
 31%|███████████████████████████████████▏                                                                            | 2932/9317 [00:04<00:08, 797.51 MB/s]
 32%|████████████████████████████████████▏                                                                           | 3013/9317 [00:04<00:08, 779.41 MB/s]
 33%|█████████████████████████████████████▎                                                                          | 3101/9317 [00:04<00:07, 781.52 MB/s]
 34%|██████████████████████████████████████▍                                                                         | 3197/9317 [00:04<00:07, 804.71 MB/s]
 35%|███████████████████████████████████████▌                                                                        | 3294/9317 [00:04<00:07, 822.34 MB/s]
 36%|████████████████████████████████████████▊                                                                       | 3390/9317 [00:04<00:07, 827.61 MB/s]
 37%|█████████████████████████████████████████▉                                                                      | 3487/9317 [00:05<00:07, 823.02 MB/s]
 38%|██████████████████████████████████████████▉                                                                     | 3570/9317 [00:05<00:14, 405.69 MB/s]
 39%|███████████████████████████████████████████▋                                                                    | 3633/9317 [00:05<00:13, 432.43 MB/s]
 40%|████████████████████████████████████████████▍                                                                   | 3694/9317 [00:05<00:12, 455.39 MB/s]
 40%|█████████████████████████████████████████████                                                                   | 3753/9317 [00:05<00:11, 471.09 MB/s]
 41%|█████████████████████████████████████████████▊                                                                  | 3810/9317 [00:06<00:11, 479.78 MB/s]
 41%|██████████████████████████████████████████████▍                                                                 | 3866/9317 [00:06<00:11, 484.41 MB/s]
 42%|███████████████████████████████████████████████▏                                                                | 3922/9317 [00:06<00:11, 488.60 MB/s]
 43%|████████████████████████████████████████████████                                                                | 3994/9317 [00:06<00:10, 530.54 MB/s]
 44%|████████████████████████████████████████████████▉                                                               | 4066/9317 [00:06<00:09, 562.39 MB/s]
 44%|█████████████████████████████████████████████████▋                                                              | 4138/9317 [00:06<00:08, 585.40 MB/s]
 45%|██████████████████████████████████████████████████▌                                                             | 4210/9317 [00:06<00:08, 601.84 MB/s]
 46%|███████████████████████████████████████████████████▍                                                            | 4282/9317 [00:06<00:07, 630.20 MB/s]
 47%|████████████████████████████████████████████████████▎                                                           | 4356/9317 [00:06<00:07, 639.41 MB/s]
 48%|█████████████████████████████████████████████████████▎                                                          | 4430/9317 [00:07<00:07, 643.19 MB/s]
 48%|██████████████████████████████████████████████████████▏                                                         | 4505/9317 [00:07<00:07, 655.14 MB/s]
 49%|██████████████████████████████████████████████████████▉                                                         | 4571/9317 [00:07<00:14, 334.40 MB/s]
 50%|███████████████████████████████████████████████████████▋                                                        | 4631/9317 [00:07<00:12, 371.36 MB/s]
 50%|████████████████████████████████████████████████████████▎                                                       | 4684/9317 [00:07<00:11, 392.24 MB/s]
 51%|████████████████████████████████████████████████████████▉                                                       | 4737/9317 [00:07<00:11, 411.37 MB/s]
 51%|█████████████████████████████████████████████████████████▌                                                      | 4791/9317 [00:08<00:10, 428.78 MB/s]
 52%|██████████████████████████████████████████████████████████▎                                                     | 4846/9317 [00:08<00:10, 444.74 MB/s]
 53%|██████████████████████████████████████████████████████████▉                                                     | 4901/9317 [00:08<00:09, 470.85 MB/s]
 53%|███████████████████████████████████████████████████████████▌                                                    | 4957/9317 [00:08<00:09, 478.59 MB/s]
 54%|████████████████████████████████████████████████████████████▎                                                   | 5014/9317 [00:08<00:09, 472.10 MB/s]
 54%|████████████████████████████████████████████████████████████▉                                                   | 5070/9317 [00:08<00:08, 492.87 MB/s]
 55%|█████████████████████████████████████████████████████████████▋                                                  | 5127/9317 [00:08<00:08, 497.20 MB/s]
 56%|██████████████████████████████████████████████████████████████▎                                                 | 5185/9317 [00:08<00:08, 503.46 MB/s]
 56%|███████████████████████████████████████████████████████████████                                                 | 5242/9317 [00:08<00:08, 505.36 MB/s]
 57%|███████████████████████████████████████████████████████████████▋                                                | 5300/9317 [00:09<00:07, 508.50 MB/s]
 58%|████████████████████████████████████████████████████████████████▍                                               | 5359/9317 [00:09<00:07, 513.00 MB/s]
 58%|█████████████████████████████████████████████████████████████████▏                                              | 5418/9317 [00:09<00:07, 516.67 MB/s]
 59%|█████████████████████████████████████████████████████████████████▊                                              | 5478/9317 [00:09<00:07, 523.49 MB/s]
 59%|██████████████████████████████████████████████████████████████████▌                                             | 5538/9317 [00:09<00:07, 516.67 MB/s]
 60%|███████████████████████████████████████████████████████████████████▎                                            | 5598/9317 [00:09<00:07, 522.55 MB/s]
 61%|████████████████████████████████████████████████████████████████████                                            | 5658/9317 [00:09<00:06, 523.33 MB/s]
 61%|████████████████████████████████████████████████████████████████████▋                                           | 5718/9317 [00:09<00:06, 529.39 MB/s]
 62%|█████████████████████████████████████████████████████████████████████▍                                          | 5778/9317 [00:09<00:06, 531.16 MB/s]
 63%|██████████████████████████████████████████████████████████████████████▏                                         | 5840/9317 [00:10<00:06, 538.21 MB/s]
 63%|██████████████████████████████████████████████████████████████████████▉                                         | 5901/9317 [00:10<00:06, 539.52 MB/s]
 64%|███████████████████████████████████████████████████████████████████████▋                                        | 5963/9317 [00:10<00:06, 514.34 MB/s]
 65%|████████████████████████████████████████████████████████████████████████▍                                       | 6025/9317 [00:10<00:06, 524.26 MB/s]
 65%|█████████████████████████████████████████████████████████████████████████▏                                      | 6087/9317 [00:10<00:06, 531.75 MB/s]
 66%|█████████████████████████████████████████████████████████████████████████▉                                      | 6150/9317 [00:10<00:05, 540.22 MB/s]
 67%|██████████████████████████████████████████████████████████████████████████▋                                     | 6212/9317 [00:10<00:05, 543.36 MB/s]
 67%|███████████████████████████████████████████████████████████████████████████▍                                    | 6274/9317 [00:10<00:05, 545.31 MB/s]
 68%|████████████████████████████████████████████████████████████████████████████▏                                   | 6336/9317 [00:10<00:05, 547.12 MB/s]
 69%|████████████████████████████████████████████████████████████████████████████▉                                   | 6399/9317 [00:11<00:05, 551.19 MB/s]
 69%|█████████████████████████████████████████████████████████████████████████████▋                                  | 6463/9317 [00:11<00:05, 545.19 MB/s]
 70%|██████████████████████████████████████████████████████████████████████████████▍                                 | 6526/9317 [00:11<00:05, 549.96 MB/s]
 71%|███████████████████████████████████████████████████████████████████████████████▏                                | 6589/9317 [00:11<00:04, 550.37 MB/s]
 71%|███████████████████████████████████████████████████████████████████████████████▉                                | 6652/9317 [00:11<00:04, 553.31 MB/s]
 72%|████████████████████████████████████████████████████████████████████████████████▋                               | 6716/9317 [00:11<00:04, 558.88 MB/s]
 73%|█████████████████████████████████████████████████████████████████████████████████▍                              | 6778/9317 [00:11<00:04, 556.98 MB/s]
 73%|██████████████████████████████████████████████████████████████████████████████████▏                             | 6842/9317 [00:11<00:04, 560.72 MB/s]
 74%|███████████████████████████████████████████████████████████████████████████████████                             | 6906/9317 [00:12<00:04, 557.64 MB/s]
 75%|███████████████████████████████████████████████████████████████████████████████████▊                            | 6968/9317 [00:12<00:04, 551.76 MB/s]
 75%|████████████████████████████████████████████████████████████████████████████████████▍                           | 7024/9317 [00:12<00:07, 287.24 MB/s]
 76%|█████████████████████████████████████████████████████████████████████████████████████                           | 7074/9317 [00:12<00:07, 316.50 MB/s]
 76%|█████████████████████████████████████████████████████████████████████████████████████▌                          | 7119/9317 [00:12<00:06, 333.96 MB/s]
 77%|██████████████████████████████████████████████████████████████████████████████████████▏                         | 7165/9317 [00:12<00:06, 351.16 MB/s]
 77%|██████████████████████████████████████████████████████████████████████████████████████▋                         | 7211/9317 [00:13<00:05, 365.84 MB/s]
 78%|███████████████████████████████████████████████████████████████████████████████████████▏                        | 7257/9317 [00:13<00:05, 377.41 MB/s]
 78%|███████████████████████████████████████████████████████████████████████████████████████▊                        | 7303/9317 [00:13<00:05, 385.95 MB/s]
 79%|████████████████████████████████████████████████████████████████████████████████████████▎                       | 7351/9317 [00:13<00:04, 397.38 MB/s]
 79%|████████████████████████████████████████████████████████████████████████████████████████▉                       | 7399/9317 [00:13<00:04, 406.23 MB/s]
 80%|█████████████████████████████████████████████████████████████████████████████████████████▌                      | 7447/9317 [00:13<00:04, 412.58 MB/s]
 80%|██████████████████████████████████████████████████████████████████████████████████████████                      | 7495/9317 [00:13<00:04, 417.21 MB/s]
 81%|██████████████████████████████████████████████████████████████████████████████████████████▋                     | 7542/9317 [00:13<00:04, 431.50 MB/s]
 81%|███████████████████████████████████████████████████████████████████████████████████████████▎                    | 7591/9317 [00:13<00:03, 432.47 MB/s]
 82%|███████████████████████████████████████████████████████████████████████████████████████████▊                    | 7640/9317 [00:14<00:03, 434.05 MB/s]
 83%|████████████████████████████████████████████████████████████████████████████████████████████▍                   | 7690/9317 [00:14<00:03, 437.05 MB/s]
 83%|█████████████████████████████████████████████████████████████████████████████████████████████                   | 7740/9317 [00:14<00:03, 439.31 MB/s]
 84%|█████████████████████████████████████████████████████████████████████████████████████████████▋                  | 7790/9317 [00:14<00:03, 440.70 MB/s]
 84%|██████████████████████████████████████████████████████████████████████████████████████████████▏                 | 7840/9317 [00:14<00:03, 441.89 MB/s]
 85%|██████████████████████████████████████████████████████████████████████████████████████████████▊                 | 7891/9317 [00:14<00:03, 445.39 MB/s]
 85%|███████████████████████████████████████████████████████████████████████████████████████████████▍                | 7942/9317 [00:14<00:03, 448.04 MB/s]
 86%|████████████████████████████████████████████████████████████████████████████████████████████████                | 7993/9317 [00:14<00:02, 449.60 MB/s]
 86%|████████████████████████████████████████████████████████████████████████████████████████████████▋               | 8045/9317 [00:14<00:02, 453.63 MB/s]
 87%|█████████████████████████████████████████████████████████████████████████████████████████████████▎              | 8097/9317 [00:15<00:02, 448.69 MB/s]
 87%|█████████████████████████████████████████████████████████████████████████████████████████████████▉              | 8149/9317 [00:15<00:02, 452.71 MB/s]
 88%|██████████████████████████████████████████████████████████████████████████████████████████████████▌             | 8201/9317 [00:15<00:02, 456.42 MB/s]
 89%|███████████████████████████████████████████████████████████████████████████████████████████████████▏            | 8254/9317 [00:15<00:02, 458.49 MB/s]
 89%|███████████████████████████████████████████████████████████████████████████████████████████████████▊            | 8306/9317 [00:15<00:02, 460.13 MB/s]
 90%|████████████████████████████████████████████████████████████████████████████████████████████████████▍           | 8358/9317 [00:15<00:02, 461.42 MB/s]
 90%|█████████████████████████████████████████████████████████████████████████████████████████████████████           | 8411/9317 [00:15<00:01, 464.77 MB/s]
 91%|█████████████████████████████████████████████████████████████████████████████████████████████████████▋          | 8464/9317 [00:15<00:01, 466.98 MB/s]
 91%|██████████████████████████████████████████████████████████████████████████████████████████████████████▍         | 8517/9317 [00:15<00:01, 468.60 MB/s]
 92%|███████████████████████████████████████████████████████████████████████████████████████████████████████         | 8570/9317 [00:16<00:01, 469.76 MB/s]
 93%|███████████████████████████████████████████████████████████████████████████████████████████████████████▋        | 8623/9317 [00:16<00:01, 470.99 MB/s]
 93%|████████████████████████████████████████████████████████████████████████████████████████████████████████▎       | 8677/9317 [00:16<00:01, 474.42 MB/s]
 94%|████████████████████████████████████████████████████████████████████████████████████████████████████████▉       | 8730/9317 [00:16<00:01, 473.23 MB/s]
 94%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▌      | 8784/9317 [00:16<00:01, 465.84 MB/s]
 95%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▏     | 8837/9317 [00:16<00:01, 467.58 MB/s]
 95%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▉     | 8891/9317 [00:16<00:00, 469.45 MB/s]
 96%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▌    | 8945/9317 [00:16<00:00, 472.75 MB/s]
 97%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▏   | 8999/9317 [00:16<00:00, 474.78 MB/s]
 97%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▊   | 9052/9317 [00:17<00:00, 471.71 MB/s]
 98%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▍  | 9107/9317 [00:17<00:00, 476.22 MB/s]
 98%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████  | 9161/9317 [00:17<00:00, 485.27 MB/s]
 99%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████▊ | 9215/9317 [00:17<00:00, 484.01 MB/s]
 99%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████▍| 9269/9317 [00:17<00:00, 496.97 MB/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 9317/9317 [00:17<00:00, 529.73 MB/s]

  0%|                                                                                                                               | 0/1 [00:00<?, ? MB/s]
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 124.06 MB/s]

  0%|                                                                                                                               | 0/3 [00:00<?, ? MB/s]
 33%|███████████████████████████████████████▋                                                                               | 1/3 [00:00<00:00,  8.96 MB/s]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 26.89 MB/s]

  0%|                                                                                                                               | 0/1 [00:00<?, ? MB/s]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<?, ? MB/s]

  0%|                                                                                                                               | 0/3 [00:00<?, ? MB/s]
 33%|███████████████████████████████████████▋                                                                               | 1/3 [00:00<00:00,  8.95 MB/s]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 26.34 MB/s]

  0%|                                                                                                                              | 0/15 [00:00<?, ? MB/s]
  7%|███████▊                                                                                                              | 1/15 [00:00<00:01,  9.58 MB/s]
 13%|███████████████▋                                                                                                      | 2/15 [00:00<00:01,  9.14 MB/s]
 40%|███████████████████████████████████████████████▏                                                                      | 6/15 [00:00<00:00, 21.56 MB/s]
 87%|█████████████████████████████████████████████████████████████████████████████████████████████████████▍               | 13/15 [00:00<00:00, 38.94 MB/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:00<00:00, 34.69 MB/s]

In this example, the function load_nifti is used to load the CTI data saved in filefdata and returns the data as a nibabel Nifti1Image object along with the affine transformation. The b-values and b-vectors for two different gradient tables are loaded from bvals1.bval and bvec1.bvec, and bvals2.bval and bvec2.bvec, respectively, using the read_bvals_bvecs function. For CTI reconstruction in DIPY, we need to define the b-values and b-vectors for each diffusion epoch in separate gradient tables, as done in the above line of code.

gtab1 = gradient_table(bvals1, bvecs1)
gtab2 = gradient_table(bvals2, bvecs2)

Before fitting the data, we perform some data pre-processing. We first compute a brain mask to avoid unnecessary calculations on the background of the image.

mask, mask_affine = load_nifti(fmask)

Now that we’ve loaded the data and generated the two gradient tables we can go forward with CTI fitting. For this, the CTI model is first defined for GradientTable objects gtab1 and gtab2 by instantiating the CorrelationTensorModel object in the following way:

ctimodel = cti.CorrelationTensorModel(gtab1, gtab2)

To fit the data using the defined model object, we call the fit function of this object.

ctifit = ctimodel.fit(data, mask=mask)
  0%|                                                                                                                           | 0/7516.0 [00:00<?, ?it/s]
  0%|▌                                                                                                                | 36/7516.0 [00:00<00:21, 355.98it/s]
  1%|█                                                                                                                | 72/7516.0 [00:00<00:20, 356.63it/s]
  1%|█▌                                                                                                              | 108/7516.0 [00:00<00:20, 356.71it/s]
  2%|██▏                                                                                                             | 144/7516.0 [00:00<00:22, 330.45it/s]
  2%|██▋                                                                                                             | 178/7516.0 [00:00<00:22, 321.82it/s]
  3%|███▏                                                                                                            | 211/7516.0 [00:00<00:22, 323.57it/s]
  3%|███▋                                                                                                            | 244/7516.0 [00:00<00:22, 324.63it/s]
  4%|████▏                                                                                                           | 277/7516.0 [00:00<00:22, 315.68it/s]
  4%|████▌                                                                                                           | 309/7516.0 [00:00<00:23, 306.99it/s]
  5%|█████                                                                                                           | 340/7516.0 [00:01<00:23, 301.54it/s]
  5%|█████▌                                                                                                          | 371/7516.0 [00:01<00:23, 299.49it/s]
  5%|█████▉                                                                                                          | 402/7516.0 [00:01<00:23, 301.65it/s]
  6%|██████▍                                                                                                         | 434/7516.0 [00:01<00:23, 306.14it/s]
  6%|██████▉                                                                                                         | 465/7516.0 [00:01<00:23, 306.45it/s]
  7%|███████▍                                                                                                        | 496/7516.0 [00:01<00:23, 297.89it/s]
  7%|███████▊                                                                                                        | 526/7516.0 [00:01<00:24, 291.02it/s]
  7%|████████▎                                                                                                       | 558/7516.0 [00:01<00:23, 298.62it/s]
  8%|████████▊                                                                                                       | 591/7516.0 [00:01<00:22, 306.52it/s]
  8%|█████████▎                                                                                                      | 622/7516.0 [00:01<00:22, 306.05it/s]
  9%|█████████▋                                                                                                      | 653/7516.0 [00:02<00:22, 306.45it/s]
  9%|██████████▎                                                                                                     | 691/7516.0 [00:02<00:20, 327.30it/s]
 10%|██████████▊                                                                                                     | 725/7516.0 [00:02<00:20, 330.21it/s]
 10%|███████████▎                                                                                                    | 759/7516.0 [00:02<00:20, 332.10it/s]
 11%|███████████▊                                                                                                    | 793/7516.0 [00:02<00:20, 333.35it/s]
 11%|████████████▎                                                                                                   | 827/7516.0 [00:02<00:20, 324.63it/s]
 11%|████████████▊                                                                                                   | 860/7516.0 [00:02<00:20, 325.20it/s]
 12%|█████████████▍                                                                                                  | 898/7516.0 [00:02<00:19, 340.33it/s]
 12%|█████████████▉                                                                                                  | 933/7516.0 [00:02<00:19, 342.16it/s]
 13%|██████████████▍                                                                                                 | 968/7516.0 [00:03<00:19, 343.60it/s]
 13%|██████████████▊                                                                                                | 1003/7516.0 [00:03<00:19, 334.61it/s]
 14%|███████████████▎                                                                                               | 1037/7516.0 [00:03<00:19, 325.80it/s]
 14%|███████████████▊                                                                                               | 1070/7516.0 [00:03<00:19, 326.22it/s]
 15%|████████████████▎                                                                                              | 1106/7516.0 [00:03<00:19, 335.02it/s]
 15%|████████████████▊                                                                                              | 1140/7516.0 [00:03<00:18, 335.58it/s]
 16%|█████████████████▎                                                                                             | 1175/7516.0 [00:03<00:18, 338.94it/s]
 16%|█████████████████▉                                                                                             | 1211/7516.0 [00:03<00:18, 344.23it/s]
 17%|██████████████████▍                                                                                            | 1248/7516.0 [00:03<00:17, 350.60it/s]
 17%|██████████████████▉                                                                                            | 1285/7516.0 [00:03<00:17, 355.59it/s]
 18%|███████████████████▌                                                                                           | 1321/7516.0 [00:04<00:17, 345.33it/s]
 18%|████████████████████                                                                                           | 1356/7516.0 [00:04<00:18, 335.47it/s]
 18%|████████████████████▌                                                                                          | 1390/7516.0 [00:04<00:19, 317.42it/s]
 19%|█████████████████████                                                                                          | 1422/7516.0 [00:04<00:19, 317.16it/s]
 19%|█████████████████████▍                                                                                         | 1454/7516.0 [00:04<00:19, 308.45it/s]
 20%|█████████████████████▉                                                                                         | 1487/7516.0 [00:04<00:19, 313.80it/s]
 20%|██████████████████████▍                                                                                        | 1520/7516.0 [00:04<00:18, 317.48it/s]
 21%|██████████████████████▉                                                                                        | 1557/7516.0 [00:04<00:17, 331.74it/s]
 21%|███████████████████████▌                                                                                       | 1592/7516.0 [00:04<00:17, 336.19it/s]
 22%|████████████████████████                                                                                       | 1626/7516.0 [00:05<00:17, 336.44it/s]
 22%|████████████████████████▌                                                                                      | 1660/7516.0 [00:05<00:17, 336.68it/s]
 23%|█████████████████████████                                                                                      | 1694/7516.0 [00:05<00:17, 336.73it/s]
 23%|█████████████████████████▌                                                                                     | 1728/7516.0 [00:05<00:17, 336.75it/s]
 24%|██████████████████████████▏                                                                                    | 1769/7516.0 [00:05<00:16, 357.52it/s]
 24%|██████████████████████████▋                                                                                    | 1805/7516.0 [00:05<00:15, 357.24it/s]
 24%|███████████████████████████▏                                                                                   | 1841/7516.0 [00:05<00:15, 357.10it/s]
 25%|███████████████████████████▋                                                                                   | 1877/7516.0 [00:05<00:15, 356.94it/s]
 25%|████████████████████████████▎                                                                                  | 1913/7516.0 [00:05<00:15, 356.88it/s]
 26%|████████████████████████████▊                                                                                  | 1949/7516.0 [00:05<00:15, 351.16it/s]
 26%|█████████████████████████████▎                                                                                 | 1985/7516.0 [00:06<00:16, 342.87it/s]
 27%|█████████████████████████████▊                                                                                 | 2020/7516.0 [00:06<00:18, 297.04it/s]
 27%|██████████████████████████████▎                                                                                | 2051/7516.0 [00:06<00:18, 299.47it/s]
 28%|██████████████████████████████▊                                                                                | 2086/7516.0 [00:06<00:17, 312.32it/s]
 28%|███████████████████████████████▎                                                                               | 2118/7516.0 [00:06<00:17, 313.72it/s]
 29%|███████████████████████████████▊                                                                               | 2151/7516.0 [00:06<00:16, 317.38it/s]
 29%|████████████████████████████████▎                                                                              | 2184/7516.0 [00:06<00:16, 320.09it/s]
 29%|████████████████████████████████▋                                                                              | 2217/7516.0 [00:06<00:16, 321.99it/s]
 30%|█████████████████████████████████▏                                                                             | 2250/7516.0 [00:06<00:16, 323.51it/s]
 30%|█████████████████████████████████▋                                                                             | 2283/7516.0 [00:06<00:16, 324.60it/s]
 31%|██████████████████████████████████▏                                                                            | 2316/7516.0 [00:07<00:16, 315.98it/s]
 31%|██████████████████████████████████▋                                                                            | 2352/7516.0 [00:07<00:15, 327.91it/s]
 32%|███████████████████████████████████▎                                                                           | 2387/7516.0 [00:07<00:15, 333.52it/s]
 32%|███████████████████████████████████▊                                                                           | 2421/7516.0 [00:07<00:15, 334.46it/s]
 33%|████████████████████████████████████▎                                                                          | 2455/7516.0 [00:07<00:15, 335.35it/s]
 33%|████████████████████████████████████▊                                                                          | 2489/7516.0 [00:07<00:14, 335.97it/s]
 34%|█████████████████████████████████████▎                                                                         | 2523/7516.0 [00:07<00:15, 327.73it/s]
 34%|█████████████████████████████████████▋                                                                         | 2556/7516.0 [00:07<00:15, 325.38it/s]
 34%|██████████████████████████████████████▏                                                                        | 2589/7516.0 [00:07<00:15, 325.75it/s]
 35%|██████████████████████████████████████▋                                                                        | 2622/7516.0 [00:08<00:15, 323.01it/s]
 35%|███████████████████████████████████████▎                                                                       | 2658/7516.0 [00:08<00:14, 328.21it/s]
 36%|███████████████████████████████████████▋                                                                       | 2691/7516.0 [00:08<00:14, 325.83it/s]
 36%|████████████████████████████████████████▏                                                                      | 2724/7516.0 [00:08<00:14, 326.20it/s]
 37%|████████████████████████████████████████▋                                                                      | 2758/7516.0 [00:08<00:14, 329.13it/s]
 37%|█████████████████████████████████████████▏                                                                     | 2793/7516.0 [00:08<00:14, 334.24it/s]
 38%|█████████████████████████████████████████▊                                                                     | 2827/7516.0 [00:08<00:13, 334.99it/s]
 38%|██████████████████████████████████████████▎                                                                    | 2861/7516.0 [00:08<00:14, 325.93it/s]
 39%|██████████████████████████████████████████▋                                                                    | 2894/7516.0 [00:08<00:14, 326.36it/s]
 39%|███████████████████████████████████████████▏                                                                   | 2927/7516.0 [00:08<00:14, 317.26it/s]
 39%|███████████████████████████████████████████▋                                                                   | 2960/7516.0 [00:09<00:14, 320.08it/s]
 40%|████████████████████████████████████████████▏                                                                  | 2993/7516.0 [00:09<00:14, 322.16it/s]
 40%|████████████████████████████████████████████▋                                                                  | 3026/7516.0 [00:09<00:13, 323.42it/s]
 41%|█████████████████████████████████████████████▏                                                                 | 3059/7516.0 [00:09<00:14, 315.09it/s]
 41%|█████████████████████████████████████████████▋                                                                 | 3093/7516.0 [00:09<00:13, 321.47it/s]
 42%|██████████████████████████████████████████████▏                                                                | 3129/7516.0 [00:09<00:13, 331.90it/s]
 42%|██████████████████████████████████████████████▊                                                                | 3169/7516.0 [00:09<00:12, 350.87it/s]
 43%|███████████████████████████████████████████████▎                                                               | 3205/7516.0 [00:09<00:12, 352.51it/s]
 43%|███████████████████████████████████████████████▊                                                               | 3241/7516.0 [00:09<00:12, 343.52it/s]
 44%|████████████████████████████████████████████████▍                                                              | 3276/7516.0 [00:10<00:12, 334.35it/s]
 44%|████████████████████████████████████████████████▉                                                              | 3312/7516.0 [00:10<00:12, 334.22it/s]
 45%|█████████████████████████████████████████████████▍                                                             | 3346/7516.0 [00:10<00:12, 333.13it/s]
 45%|█████████████████████████████████████████████████▉                                                             | 3380/7516.0 [00:10<00:12, 334.18it/s]
 45%|██████████████████████████████████████████████████▍                                                            | 3418/7516.0 [00:10<00:11, 346.23it/s]
 46%|██████████████████████████████████████████████████▉                                                            | 3453/7516.0 [00:10<00:11, 346.50it/s]
 46%|███████████████████████████████████████████████████▌                                                           | 3488/7516.0 [00:10<00:11, 346.66it/s]
 47%|████████████████████████████████████████████████████                                                           | 3523/7516.0 [00:10<00:11, 346.66it/s]
 47%|████████████████████████████████████████████████████▌                                                          | 3559/7516.0 [00:10<00:11, 349.62it/s]
 48%|█████████████████████████████████████████████████████                                                          | 3594/7516.0 [00:10<00:11, 348.86it/s]
 48%|█████████████████████████████████████████████████████▌                                                         | 3629/7516.0 [00:11<00:11, 332.16it/s]
 49%|██████████████████████████████████████████████████████                                                         | 3663/7516.0 [00:11<00:12, 320.13it/s]
 49%|██████████████████████████████████████████████████████▌                                                        | 3696/7516.0 [00:11<00:11, 321.62it/s]
 50%|███████████████████████████████████████████████████████                                                        | 3729/7516.0 [00:11<00:11, 323.11it/s]
 50%|███████████████████████████████████████████████████████▌                                                       | 3762/7516.0 [00:11<00:11, 324.21it/s]
 50%|████████████████████████████████████████████████████████                                                       | 3795/7516.0 [00:11<00:11, 325.09it/s]
 51%|████████████████████████████████████████████████████████▌                                                      | 3828/7516.0 [00:11<00:11, 325.71it/s]
 51%|█████████████████████████████████████████████████████████                                                      | 3861/7516.0 [00:11<00:11, 326.11it/s]
 52%|█████████████████████████████████████████████████████████▌                                                     | 3894/7516.0 [00:11<00:11, 326.46it/s]
 52%|█████████████████████████████████████████████████████████▉                                                     | 3927/7516.0 [00:11<00:11, 317.14it/s]
 53%|██████████████████████████████████████████████████████████▍                                                    | 3961/7516.0 [00:12<00:11, 322.92it/s]
 53%|███████████████████████████████████████████████████████████                                                    | 3999/7516.0 [00:12<00:10, 338.76it/s]
 54%|███████████████████████████████████████████████████████████▌                                                   | 4035/7516.0 [00:12<00:10, 344.19it/s]
 54%|████████████████████████████████████████████████████████████                                                   | 4070/7516.0 [00:12<00:10, 334.88it/s]
 55%|████████████████████████████████████████████████████████████▌                                                  | 4104/7516.0 [00:12<00:10, 335.41it/s]
 55%|█████████████████████████████████████████████████████████████▏                                                 | 4145/7516.0 [00:12<00:09, 356.25it/s]
 56%|█████████████████████████████████████████████████████████████▋                                                 | 4181/7516.0 [00:12<00:09, 348.22it/s]
 56%|██████████████████████████████████████████████████████████████▎                                                | 4216/7516.0 [00:12<00:09, 345.80it/s]
 57%|██████████████████████████████████████████████████████████████▊                                                | 4251/7516.0 [00:12<00:09, 346.18it/s]
 57%|███████████████████████████████████████████████████████████████▎                                               | 4286/7516.0 [00:13<00:09, 342.94it/s]
 57%|███████████████████████████████████████████████████████████████▊                                               | 4321/7516.0 [00:13<00:09, 320.49it/s]
 58%|████████████████████████████████████████████████████████████████▎                                              | 4354/7516.0 [00:13<00:09, 320.12it/s]
 58%|████████████████████████████████████████████████████████████████▊                                              | 4387/7516.0 [00:13<00:09, 322.05it/s]
 59%|█████████████████████████████████████████████████████████████████▎                                             | 4425/7516.0 [00:13<00:09, 337.81it/s]
 59%|█████████████████████████████████████████████████████████████████▉                                             | 4462/7516.0 [00:13<00:08, 346.29it/s]
 60%|██████████████████████████████████████████████████████████████████▍                                            | 4500/7516.0 [00:13<00:08, 355.24it/s]
 60%|██████████████████████████████████████████████████████████████████▉                                            | 4536/7516.0 [00:13<00:08, 355.41it/s]
 61%|███████████████████████████████████████████████████████████████████▌                                           | 4572/7516.0 [00:13<00:08, 335.79it/s]
 61%|████████████████████████████████████████████████████████████████████                                           | 4606/7516.0 [00:13<00:08, 335.28it/s]
 62%|████████████████████████████████████████████████████████████████████▌                                          | 4640/7516.0 [00:14<00:08, 327.81it/s]
 62%|█████████████████████████████████████████████████████████████████████                                          | 4674/7516.0 [00:14<00:08, 330.47it/s]
 63%|█████████████████████████████████████████████████████████████████████▌                                         | 4710/7516.0 [00:14<00:08, 338.12it/s]
 63%|██████████████████████████████████████████████████████████████████████                                         | 4744/7516.0 [00:14<00:08, 337.51it/s]
 64%|██████████████████████████████████████████████████████████████████████▌                                        | 4781/7516.0 [00:14<00:07, 346.20it/s]
 64%|███████████████████████████████████████████████████████████████████████▏                                       | 4816/7516.0 [00:14<00:07, 346.45it/s]
 65%|███████████████████████████████████████████████████████████████████████▋                                       | 4851/7516.0 [00:14<00:07, 336.64it/s]
 65%|████████████████████████████████████████████████████████████████████████▏                                      | 4885/7516.0 [00:14<00:07, 329.10it/s]
 66%|████████████████████████████████████████████████████████████████████████▋                                      | 4925/7516.0 [00:14<00:07, 348.37it/s]
 66%|█████████████████████████████████████████████████████████████████████████▎                                     | 4961/7516.0 [00:14<00:07, 349.32it/s]
 66%|█████████████████████████████████████████████████████████████████████████▊                                     | 4997/7516.0 [00:15<00:07, 340.64it/s]
 67%|██████████████████████████████████████████████████████████████████████████▎                                    | 5032/7516.0 [00:15<00:07, 314.73it/s]
 67%|██████████████████████████████████████████████████████████████████████████▊                                    | 5069/7516.0 [00:15<00:07, 329.01it/s]
 68%|███████████████████████████████████████████████████████████████████████████▎                                   | 5103/7516.0 [00:15<00:07, 331.29it/s]
 68%|███████████████████████████████████████████████████████████████████████████▉                                   | 5138/7516.0 [00:15<00:07, 335.85it/s]
 69%|████████████████████████████████████████████████████████████████████████████▍                                  | 5172/7516.0 [00:15<00:06, 336.00it/s]
 69%|████████████████████████████████████████████████████████████████████████████▉                                  | 5206/7516.0 [00:15<00:07, 326.51it/s]
 70%|█████████████████████████████████████████████████████████████████████████████▍                                 | 5240/7516.0 [00:15<00:06, 329.49it/s]
 70%|█████████████████████████████████████████████████████████████████████████████▉                                 | 5280/7516.0 [00:15<00:06, 349.06it/s]
 71%|██████████████████████████████████████████████████████████████████████████████▌                                | 5316/7516.0 [00:16<00:06, 351.27it/s]
 71%|███████████████████████████████████████████████████████████████████████████████                                | 5352/7516.0 [00:16<00:06, 342.77it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▌                               | 5387/7516.0 [00:16<00:06, 334.20it/s]
 72%|████████████████████████████████████████████████████████████████████████████████                               | 5421/7516.0 [00:16<00:06, 327.30it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▌                              | 5458/7516.0 [00:16<00:06, 336.62it/s]
 73%|█████████████████████████████████████████████████████████████████████████████████                              | 5492/7516.0 [00:16<00:06, 336.77it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▌                             | 5526/7516.0 [00:16<00:05, 336.83it/s]
 74%|██████████████████████████████████████████████████████████████████████████████████                             | 5560/7516.0 [00:16<00:05, 336.77it/s]
 74%|██████████████████████████████████████████████████████████████████████████████████▋                            | 5595/7516.0 [00:16<00:05, 339.63it/s]
 75%|███████████████████████████████████████████████████████████████████████████████████▏                           | 5629/7516.0 [00:16<00:05, 338.83it/s]
 75%|███████████████████████████████████████████████████████████████████████████████████▋                           | 5663/7516.0 [00:17<00:05, 338.34it/s]
 76%|████████████████████████████████████████████████████████████████████████████████████▏                          | 5697/7516.0 [00:17<00:05, 338.06it/s]
 76%|████████████████████████████████████████████████████████████████████████████████████▋                          | 5731/7516.0 [00:17<00:05, 329.81it/s]
 77%|█████████████████████████████████████████████████████████████████████████████████████▏                         | 5772/7516.0 [00:17<00:04, 352.35it/s]
 77%|█████████████████████████████████████████████████████████████████████████████████████▊                         | 5810/7516.0 [00:17<00:04, 357.30it/s]
 78%|██████████████████████████████████████████████████████████████████████████████████████▎                        | 5846/7516.0 [00:17<00:04, 346.83it/s]
 78%|██████████████████████████████████████████████████████████████████████████████████████▊                        | 5881/7516.0 [00:17<00:04, 339.06it/s]
 79%|███████████████████████████████████████████████████████████████████████████████████████▎                       | 5915/7516.0 [00:17<00:04, 336.32it/s]
 79%|███████████████████████████████████████████████████████████████████████████████████████▊                       | 5949/7516.0 [00:17<00:04, 336.33it/s]
 80%|████████████████████████████████████████████████████████████████████████████████████████▎                      | 5983/7516.0 [00:18<00:04, 329.77it/s]
 80%|████████████████████████████████████████████████████████████████████████████████████████▊                      | 6017/7516.0 [00:18<00:04, 321.55it/s]
 80%|█████████████████████████████████████████████████████████████████████████████████████████▎                     | 6050/7516.0 [00:18<00:04, 320.90it/s]
 81%|█████████████████████████████████████████████████████████████████████████████████████████▊                     | 6083/7516.0 [00:18<00:04, 322.46it/s]
 81%|██████████████████████████████████████████████████████████████████████████████████████████▎                    | 6116/7516.0 [00:18<00:04, 323.85it/s]
 82%|██████████████████████████████████████████████████████████████████████████████████████████▊                    | 6149/7516.0 [00:18<00:04, 315.54it/s]
 82%|███████████████████████████████████████████████████████████████████████████████████████████▎                   | 6182/7516.0 [00:18<00:04, 318.98it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████▊                   | 6215/7516.0 [00:18<00:04, 321.42it/s]
 83%|████████████████████████████████████████████████████████████████████████████████████████████▎                  | 6248/7516.0 [00:18<00:03, 323.16it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████▊                  | 6281/7516.0 [00:18<00:03, 315.00it/s]
 84%|█████████████████████████████████████████████████████████████████████████████████████████████▏                 | 6313/7516.0 [00:19<00:03, 315.60it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████▊                 | 6352/7516.0 [00:19<00:03, 336.53it/s]
 85%|██████████████████████████████████████████████████████████████████████████████████████████████▎                | 6390/7516.0 [00:19<00:03, 348.38it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▉                | 6430/7516.0 [00:19<00:02, 362.69it/s]
 86%|███████████████████████████████████████████████████████████████████████████████████████████████▌               | 6470/7516.0 [00:19<00:02, 372.78it/s]
 87%|████████████████████████████████████████████████████████████████████████████████████████████████               | 6508/7516.0 [00:19<00:02, 352.97it/s]
 87%|████████████████████████████████████████████████████████████████████████████████████████████████▋              | 6544/7516.0 [00:19<00:02, 354.00it/s]
 88%|█████████████████████████████████████████████████████████████████████████████████████████████████▏             | 6580/7516.0 [00:19<00:02, 354.70it/s]
 88%|█████████████████████████████████████████████████████████████████████████████████████████████████▋             | 6617/7516.0 [00:19<00:02, 358.14it/s]
 89%|██████████████████████████████████████████████████████████████████████████████████████████████████▎            | 6653/7516.0 [00:20<00:02, 354.27it/s]
 89%|██████████████████████████████████████████████████████████████████████████████████████████████████▊            | 6689/7516.0 [00:20<00:02, 328.72it/s]
 89%|███████████████████████████████████████████████████████████████████████████████████████████████████▎           | 6723/7516.0 [00:20<00:02, 313.01it/s]
 90%|███████████████████████████████████████████████████████████████████████████████████████████████████▊           | 6755/7516.0 [00:20<00:02, 313.90it/s]
 90%|████████████████████████████████████████████████████████████████████████████████████████████████████▏          | 6788/7516.0 [00:20<00:02, 317.66it/s]
 91%|████████████████████████████████████████████████████████████████████████████████████████████████████▊          | 6824/7516.0 [00:20<00:02, 328.95it/s]
 91%|█████████████████████████████████████████████████████████████████████████████████████████████████████▎         | 6858/7516.0 [00:20<00:02, 323.76it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▊         | 6891/7516.0 [00:20<00:01, 322.88it/s]
 92%|██████████████████████████████████████████████████████████████████████████████████████████████████████▎        | 6924/7516.0 [00:20<00:01, 324.13it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▊        | 6958/7516.0 [00:20<00:01, 327.94it/s]
 93%|███████████████████████████████████████████████████████████████████████████████████████████████████████▏       | 6991/7516.0 [00:21<00:01, 327.63it/s]
 93%|███████████████████████████████████████████████████████████████████████████████████████████████████████▊       | 7026/7516.0 [00:21<00:01, 333.34it/s]
 94%|████████████████████████████████████████████████████████████████████████████████████████████████████████▎      | 7060/7516.0 [00:21<00:01, 334.42it/s]
 94%|████████████████████████████████████████████████████████████████████████████████████████████████████████▊      | 7098/7516.0 [00:21<00:01, 347.05it/s]
 95%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▎     | 7134/7516.0 [00:21<00:01, 350.01it/s]
 95%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▉     | 7171/7516.0 [00:21<00:00, 355.05it/s]
 96%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▍    | 7207/7516.0 [00:21<00:00, 355.57it/s]
 96%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▉    | 7244/7516.0 [00:21<00:00, 358.92it/s]
 97%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▌   | 7280/7516.0 [00:21<00:00, 358.20it/s]
 97%|████████████████████████████████████████████████████████████████████████████████████████████████████████████   | 7317/7516.0 [00:21<00:00, 360.72it/s]
 98%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▌  | 7354/7516.0 [00:22<00:00, 351.78it/s]
 98%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 7391/7516.0 [00:22<00:00, 348.99it/s]
 99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▋ | 7426/7516.0 [00:22<00:00, 346.08it/s]
 99%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████▏| 7461/7516.0 [00:22<00:00, 346.07it/s]
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████▋| 7496/7516.0 [00:22<00:00, 346.40it/s]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7516/7516.0 [00:22<00:00, 332.71it/s]

The fit method for the CTI model produces a CorrelationTensorFit object, which contains the attributes of both the DKI and DTI models. Given that CTI is a built upon DKI, which itself extends the DTI model, the CorrelationTensorFit instance captures a comprehensive set of parameters and attributes from these underlying models.

For instance, the CTI model inherently estimates all DTI and DKI statistics, such as mean, axial, and radial diffusivities (MD, AD, RD) as well as the mean, axial, and radial kurtosis (MK, AK, RK). To better illustrate the extraction of main DTI/DKI parameters using the CTI model, consider the following lines of code:

AD = ctifit.ad
MD = ctifit.md
RD = ctifit.rd
MK = ctifit.mk()
AK = ctifit.ak()
RK = ctifit.rk()

However, in addition to these metrics, CTI also provides unique sources of information, not available in DTI and DKI. Below we draw a feature map of the 3 different sources of kurtosis which can exclusively be calculated from the CTI model.

kiso_map = ctifit.K_iso
kaniso_map = ctifit.K_aniso
kmicro_map = ctifit.K_micro

slice_idx = 0
fig, axarr = plt.subplots(1, 3, figsize=(15, 5))

axarr[0].imshow(kiso_map[:, :, slice_idx], cmap='gray',
                origin='lower', vmin=0, vmax=1)
axarr[0].set_title('Kiso Map')

axarr[1].imshow(kaniso_map[:, :, slice_idx], cmap='gray',
                origin='lower', vmin=0, vmax=1)
axarr[1].set_title('Kaniso Map')

axarr[2].imshow(kmicro_map[:, :, slice_idx], cmap='gray',
                origin='lower', vmin=0, vmax=1)
axarr[2].set_title('Kmicro Map')

plt.tight_layout()
plt.show()

References#

[NetoHe2020]

Henriques, R.N., Jespersen, S.N., Shemesh, N., 2020. Correlation tensor magnetic resonance imaging. Neuroimage 211. doi: 10.1016/j.neuroimage.2020.116605

[NovelloL2022]

Novello, L., Henriques, R.N., Ianus, A., Feiweier, T., Shemesh, N., Jovicich, J. 2022. In vivo Correlation Tensor MRI reveals microscopic kurtosis in the human brain on a clinical 3T scanner. Neuroimage 254: 119137 doi: 10.1016/j.neuroimage.2022.119137

[AlvesR2022]

Alves, R., Henriques, R.N., Kerkelä, L., Chavarrías C.,

Jespersen, S.N., Shemesh, N.

2022. Correlation Tensor MRI deciphers underlying kurtosis sources in stroke, Neuroimage 247: 118833. doi: 10.1016/j.neuroimage.2021.118833

[NetHe2021]

Henriques, R.N., Jespersen, S.N., Shemesh, N., 2021.

Evidence for microscopic kurtosis in neural tissue revealed by correlation tensor MRI. Magn. Reson. Med. 1-20. doi: 10.1002/mrm.28938

Total running time of the script: (1 minutes 26.555 seconds)

Gallery generated by Sphinx-Gallery