tedana.combine.make_optcom

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

Optimally combine BOLD data across TEs.

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.

Parameters:
  • 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’.

Returns:

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

Notes

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.

References

See also

tedana.utils.make_adaptive_mask()

The function used to create the adaptive_mask parameter.