bids.reports.BIDSReport¶
-
class
BIDSReport(layout, config=None)[source]¶ Generates publication-quality data acquisition methods section from BIDS dataset.
Parameters: - layout (
bids.layout.BIDSLayout) – Layout object for a BIDS dataset. - config (
strordict, optional) –Configuration info for methods generation. Can be a path to a file (str), a dictionary, or None. If None, loads and uses default configuration information. Keys in the dictionary include:
- ’dir’: a dictionary for converting encoding direction strings
- (e.g., j-) to descriptions (e.g., anterior to posterior)
- ’seq’: a dictionary of sequence abbreviations (e.g., EP) and
- corresponding names (e.g., echo planar)
- ’seqvar’: a dictionary of sequence variant abbreviations
- (e.g., SP) and corresponding names (e.g., spoiled)
Methods
generate(**kwargs)Generate the methods section. -
generate(**kwargs)[source]¶ Generate the methods section.
Parameters: task_converter ( dict, optional) – A dictionary with information for converting task names from BIDS filename format to human-readable strings.Returns: counter – A dictionary of unique descriptions across subjects in the dataset, along with the number of times each pattern occurred. In cases where all subjects underwent the same protocol, the most common pattern is most likely the most complete. In cases where the dataset contains multiple protocols, each pattern will need to be inspected manually. Return type: collections.CounterExamples
>>> from os.path import join >>> from bids.layout import BIDSLayout >>> from bids.reports import BIDSReport >>> from bids.tests import get_test_data_path >>> layout = BIDSLayout(join(get_test_data_path(), 'synthetic')) >>> report = BIDSReport(layout) >>> counter = report.generate(session='01') >>> counter.most_common()[0][0]
- layout (