Skip to content
 
Brain Pipe brain_pipe.preprocessing.brain.link.BasenameComparisonFn
Type to start searching
    Brain Pipe
    • Brain Pipe
    • API Reference
    • brain_pipe
    • brain_pipe.preprocessing
    • brain_pipe.preprocessing.brain
    • brain_pipe.preprocessing.brain.link
    Brain Pipe
    • Overview
      • Concept
      • Convenient classes
      • Additional considerations
      • Writing your own PipelineStep
      • Small Example
    • Defining and running Pipelines through configuration files
      • Running pipelines from configuration files
      • Background
      • Typical structure for SimpleDictParsers
      • Specifying the parser
    • Command Line Interface
      • API
    • API Reference
      • brain_pipe
    • BasenameComparisonFn
      • BasenameComparisonFn
        • __init__()
        • process_path()
    • Show Source

    brain_pipe.preprocessing.brain.link.BasenameComparisonFn¶

    class BasenameComparisonFn(stim_path_key: str = 'stimulus_path', ignore_extension: bool = False)¶

    Bases: object

    Compare the basename of the stimulus path to the brain data path.

    __init__(stim_path_key: str = 'stimulus_path', ignore_extension: bool = False)¶

    Create a new BasenameComparisonFn instance.

    Parameters:
    • stim_path_key (str) – The key of the stimulus path in the data dict. Defaults to “stimulus_path”.

    • ignore_extension (bool) – Whether to ignore the extension of the stimulus path. Defaults to False.

    Methods

    __init__([stim_path_key, ignore_extension])

    Create a new BasenameComparisonFn instance.

    process_path(path)

    Process a path so that it can be compared to the brain data path.

    process_path(path: Any) → str | None¶

    Process a path so that it can be compared to the brain data path.

    Parameters:

    path (Any) – The path to process.

    Returns:

    The processed path or None if the path is not valid.

    Return type:

    Optional[str]

    "Previous" brain_pipe.preprocessing.brain.link.BIDSStimulusInfoExtractor
    "Next" brain_pipe.preprocessing.brain.link.LinkStimulusToBrainResponse
    © Copyright 2023, Bernd Accou, ExpORL.
    Created using Sphinx 7.3.7. and Material for Sphinx