gastropy.neuro.fmri.apply_volume_cuts

gastropy.neuro.fmri.apply_volume_cuts#

gastropy.neuro.fmri.apply_volume_cuts(data, begin_cut=21, end_cut=21)[source]#

Remove transient volumes from the start and end of a time series.

Standard practice to remove filter transients and boundary artifacts from EGG-fMRI data.

Parameters:
  • data (array_like) – 1D array of per-volume values (e.g., phase, amplitude).

  • begin_cut (int, optional) – Number of volumes to remove from the start. Default is 21.

  • end_cut (int, optional) – Number of volumes to remove from the end. Default is 21.

Returns:

trimmed – Trimmed array. Empty if cuts exceed data length.

Return type:

np.ndarray

Examples

>>> phases = np.random.randn(420)
>>> trimmed = apply_volume_cuts(phases, begin_cut=21, end_cut=21)
>>> len(trimmed)
378