bids.layout.BIDSDataFile¶
- class BIDSDataFile(filename)[source]¶
Represents a single data file in a BIDS dataset.
Derived from BIDSFile and provides additional functionality such as obtaining pandas DataFrame data representation (via get_df).
- Attributes:
- class_
- dirname
- filename
- is_dir
- path
relpath
Return path relative to layout root
- tags
Methods
copy
(path_patterns[, symbolic_link, root, ...])Copy the contents of a file to a new location.
get_associations
([kind, include_parents])Get associated files, optionally limiting by association kind.
get_df
([include_timing, adjust_onset, ...])Return the contents of a tsv file as a pandas DataFrame.
get_entities
([metadata, values])Return entity information for the current file.
get_metadata
()Return all metadata associated with the current file.
- __init__(filename)¶
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
Methods
__init__
(filename)A simple constructor that allows initialization from kwargs.
copy
(path_patterns[, symbolic_link, root, ...])Copy the contents of a file to a new location.
get_associations
([kind, include_parents])Get associated files, optionally limiting by association kind.
get_df
([include_timing, adjust_onset, ...])Return the contents of a tsv file as a pandas DataFrame.
get_entities
([metadata, values])Return entity information for the current file.
get_metadata
()Return all metadata associated with the current file.
Attributes
class_
dirname
entities
filename
is_dir
metadata
path
registry
relpath
Return path relative to layout root
tags