BidsTabularFile¶
- class BidsTabularFile(file_path)[source]
A BIDS tabular file including its associated sidecar.
Methods
|
Constructor for a BIDS tabular file. |
Set the contents attribute of this object to None. |
|
|
Return the entity value for the specified entity. |
|
Return a key for this BIDS file given a list of entities. |
|
Set the contents of this tabular file. |
Attributes
Return the current contents of this object. |
- BidsTabularFile.__init__(file_path)[source]¶
Constructor for a BIDS tabular file.
- Parameters:
file_path (str) – Path of the tabular file.
- BidsTabularFile.clear_contents()¶
Set the contents attribute of this object to None.
- BidsTabularFile.get_entity(entity_name)¶
Return the entity value for the specified entity.
- Parameters:
entity_name (str) – Name of the BIDS entity, for example task, run, or sub.
- Returns:
Entity value if any, otherwise None.
- Return type:
str or None
- BidsTabularFile.get_key(entities=None)¶
Return a key for this BIDS file given a list of entities.
- Parameters:
entities (tuple) – A tuple of strings representing entities.
- Returns:
A key based on this object.
- Return type:
str
Notes
If entities is None, then the file path is used as the key.
- BidsTabularFile.set_contents(content_info=None, overwrite=False)[source]¶
Set the contents of this tabular file.
- Parameters:
content_info (None) – This always uses the internal file_path to create the contents.
overwrite – If False (The Default), do not overwrite existing contents if any.
- BidsTabularFile.contents¶
Return the current contents of this object.