neurocaps.extraction.TimeseriesExtractor.visualize_bold

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

Plot the Extracted Subject Timeseries.

Uses the self.subject_timeseries to visualize the extracted BOLD timeseries data of data Regions of Interest (ROIs) or regions for a specific subject and run.

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

  • run (int or str) -- The run ID of the subject to plot.

  • 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 (os.PathLike 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.

  • filename (str or None, default=None) --

    Name of the file without the extension.

    Changed in version 0.19.0: file_name to filename

  • **kwargs --

    Keyword arguments used when saving figures. Valid keywords include:

    • dpi: int, default=300 -- Dots per inch for the figure.

    • figsize: tuple, default=(11, 5) -- Size of the figure in inches.

    • bbox_inches: str or None, default="tight" -- Alters size of the whitespace in the saved image.

Returns:

self

Added in version 0.19.3.

Note

Parcellation Approach: the "nodes" and "regions" sub-keys are required in parcel_approach.