sekupy.io.subjects module

sekupy.io.subjects.add_subjectname(ds, subj)[source]

Add the name of the subject to the dataset.

This function takes a string (the name of the subject) and add it to the dataset for each element of the dataset

Parameters:
  • ds (pymvpa dataset) – the dataset where attribute should be added

  • subj (string) – the name of the subject

Returns:

ds

Return type:

pymvpa dataset modified

sekupy.io.subjects.load_subject_file(fname, n_subjects=None, delimiter=',')[source]

Load information about subjects from a file.

Parameters:
  • fname (string) –

    The file of subjects information (.csv)

    An example of subjects file is this:

    >> subjects.csv subject,group,group_split,age s01_160112alefor,1,1,21 s02_160216micbra,1,1,30 >>

  • n_subjects (integer) – The number of subjects to include.

Returns:

  • subjects (string array) – list of subjects name

  • extra_sa (dictionary) – a dictionary of extra subject attributes like age or other subject-wise information In the example above the dictionary will be: {‘group’:[1,1], ‘group_split’:[1,1], ‘age’:[21,30]}

sekupy.io.subjects.load_subjects(configuration, selected_subjects=None, n_subjects=None)[source]

Load subject list.

Parameters:
  • selected_subjects ([type]) – [description]

  • n_subjects ([type]) – [description]

  • conf ([type]) – [description]

Returns:

[description]

Return type:

[type]