make_optcom(data, tes, adaptive_mask, t2s=None, combmode='t2s', verbose=True)[source]

Optimally combine BOLD data across TEs, using only those echos with reliable signal across at least three echos. If the number of echos providing reliable signal is greater than three but less than the total number of collected echos, we assume that later echos do not provided meaningful signal.

  • data ((S x E x T) numpy.ndarray) – Concatenated BOLD data.

  • tes ((E,) numpy.ndarray) – Array of TEs, in seconds.

  • adaptive_mask ((S,) numpy.ndarray) – Array where each value indicates the number of echoes with good signal for that voxel. This mask may be thresholded; for example, with values less than 3 set to 0. For more information on thresholding, see make_adaptive_mask.

  • t2s ((S [x T]) numpy.ndarray or None, optional) – Estimated T2* values. Only required if combmode = ‘t2s’. Default is None.

  • combmode ({‘t2s’, ‘paid’}, optional) – How to combine data. Either ‘paid’ or ‘t2s’. If ‘paid’, argument ‘t2s’ is not required. Default is ‘t2s’.

  • verbose (bool, optional) – Whether to print status updates. Default is True.


combined ((S x T) numpy.ndarray) – Optimally combined data.


This function supports both the 't2s' method 1 and the 'paid' method 2. The 't2s' method operates according to the following logic:

  1. Estimate voxel- and TE-specific weights based on estimated T_2^*:

    w(T_2^*)_n = \frac{TE_n * exp(\frac{-TE}                {T_{2(est)}^*})}{\sum TE_n * exp(\frac{-TE}{T_{2(est)}^*})}

  2. Perform weighted average per voxel and TR across TEs based on weights estimated in the previous step.



Stefan Posse, Stefan Wiese, Daniel Gembris, Klaus Mathiak, Christoph Kessler, Maria-Liisa Grosse-Ruyken, Barbara Elghahwagi, Todd Richards, Stephen R Dager, and Valerij G Kiselev. Enhancement of bold-contrast sensitivity by single-shot multi-echo functional mr imaging. Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine, 42(1):87–97, 1999. URL: https://doi.org/10.1002/(SICI)1522-2594(199907)42:1<87::AID-MRM13>3.0.CO;2-O, doi:10.1002/(SICI)1522-2594(199907)42:1<87::AID-MRM13>3.0.CO;2-O.


Benedikt A Poser, Maarten J Versluis, Johannes M Hoogduin, and David G Norris. Bold contrast sensitivity enhancement and artifact reduction with multiecho epi: parallel-acquired inhomogeneity-desensitized fmri. Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine, 55(6):1227–1235, 2006. URL: https://doi.org/10.1002/mrm.20900, doi:10.1002/mrm.20900.

See also


The function used to create the adaptive_mask parameter.