TimeseriesExtractor.visualize_bold#

TimeseriesExtractor.visualize_bold(subj_id, run=None, roi_indx=None, region=None, show_figs=True, output_dir=None, plot_output_format='png', filename=None, **kwargs)[source]#

Plot the Extracted Subject Timeseries.

Visualize the extracted BOLD timeseries data of nodes (Region-of-Interests [ROIs]) or regions (anatomical regions/networks) for a specific subject and run.

Parameters:
  • subj_id (str or int) – The ID of the subject.

  • run (int, str, or None, default=None) – The run ID of the subject to plot. Must be specified if multiple runs exist for a given subject.

  • roi_indx (int, str, list[int], list[int] or None, default=None) – The indices of the parcellation nodes to plot. See “nodes” in self.parcel_approach for valid nodes.

  • region (str or None, default=None) – The region of the parcellation to plot. If not None, all nodes in the specified region will be averaged then plotted. See “regions” in self.parcel_approach for valid region.

  • show_figs (bool, default=True) – Display figures.

  • output_dir (str or None, default=None) – Directory to save plot as png image. The directory will be created if it does not exist. If None, plot will not be saved.

  • plot_output_format (str, default=”png”) –

    The format to save plots in when output_dir is specified. Options are “png” or “pkl” (which can be further modified). Note that “pickle” is also accepted.

    Changed in version 0.33.0: Replaces as_pickle and accepts a string value.

  • filename (str or None, default=None) – Name of the file without the extension.

  • **kwargs – Additional keyword arguments for customizing plots. See neurocaps.utils.PlotDefaults.visualize_bold() for all available options and their default values (See PlotDefaults Documentation for visualize_bold)

Returns:

self

Note

Parcellation Approach: the “nodes” and “regions” subkeys are required in parcel_approach.