skbold.exp_model.parse_presentation_logfile module

class PresentationLogfileCrawler(in_file, con_names, con_codes, con_design=None, con_duration=None, pulsecode=30, write_bfsl=False, verbose=True)[source]

Bases: object

Logfile crawler for Presentation (Neurobs) files; cleans logfile, calculates event onsets and durations, and (optionally) writes out .bfsl files per condition.

Parameters:
  • in_file (str or list) – Absolute path to logfile (can be a list of paths).
  • con_names (list) – List with names for each condition
  • con_codes (list) – List with codes for conditions. Can be a single integer or string (in the latter case, it may be a substring) or a list with possible values.
  • con_design (list or str) – Which ‘design’ to assume for events (if ‘multivar’, all events - regardless of condition - are treated as a separate condition/regressor; if ‘univar’, all events from a single condition are treated as a single condition). Default: ‘univar’ for all conditions.
  • con_duration (list) – If the duration cannot be parsed from the logfile, you can specify them here manually (per condition).
  • pulsecode (int) – Code with which the first (or any) pulse is logged.
  • write_bfsl (bool) – Whether to write out a .bfsl file per condition.
  • verbose (bool) – Print out intermediary output.
Variables:

df (Dataframe) – Dataframe with cleaned and parsed logfile.

parse()[source]

Parses logfile, writes bfsl (optional), and return subject-info.

Returns:subject_info_list – Bunch object to be used in Nipype pipelines.
Return type:Nilearn bunch object
parse_presentation_logfile(in_file, con_names, con_codes, con_design=None, con_duration=None, pulsecode=30)[source]

Function-interface for PresentationLogfileCrawler. Can be used to create a Nipype node.

Parameters:
  • in_file (str or list) – Absolute path to logfile (can be a list of paths).
  • con_names (list) – List with names for each condition
  • con_codes (list) – List with codes for conditions. Can be a single integer or string (in the latter case, it may be a substring) or a list with possible values.
  • con_design (list or str) – Which ‘design’ to assume for events (if ‘multivar’, all events - regardless of condition - are treated as a separate condition/regressor; if ‘univar’, all events from a single condition are treated as a single condition). Default: ‘univar’ for all conditions.
  • con_duration (list) – If the duration cannot be parsed from the logfile, you can specify them here manually (per condition).
  • pulsecode (int) – Code with which the first (or any) pulse is logged.