# XXX: take only first task for now
task = get_entity_vals(bids_root, entity_key='task')[0]

runs = get_entity_vals(bids_root, entity_key='run')
runs = runs if runs else [None]

acq = None

proc = None

rec = None

space = None

kinds = get_kinds(bids_root)
if 'eeg' in kinds and 'meg' in kinds:
    raise RuntimeError('Found data of kind EEG and MEG. Please specify an '
                       'environment variable `BIDS_KIND` and set it to the '
                       'kind you want to analyze.')
    kind = kinds[0]
elif 'eeg' in kinds:
    kind = 'eeg'
elif 'meg' in kinds:
    kind = 'meg'
else:
    raise ValueError('The study template is intended for EEG or MEG data, but'
                     'your dataset does not contain data of either type.')

# ``subjects_list`` : list of str
#   To define the list of participants, we use a list with all the anonymized
示例#2
0
def test_get_keys(return_bids_test_dir):
    """Test getting the datatypes (=kinds) of a dir."""
    kinds = get_kinds(return_bids_test_dir)
    assert kinds == ['meg']