load_presentation_log
- bidsaid.parsers.load_presentation_log(log_filepath, convert_to_seconds=None, initial_column_headers=('Trial', 'Event Type'))[source]
Loads Presentation log file as a Pandas DataFrame.
Important
Data are assumed to have at least one element that is an digit or float during parsing.
Parameters
- log_filepath
strorPath Path to the Presentation log file (i.e text, log, Excel files).
- convert_to_seconds
list[str]orNone, default=None Convert the time resolution of the specified columns from 0.1ms to seconds. See Presentation Timing.
- initial_column_headers
str, default=(“Trial”, “Event Type”) The initial column headers for data.
Returns
- pandas.Dataframe
A Pandas DataFrame of the behavioral log data.
Notes
This function works by first identifying the line containing the column headers specified in
initial_column_headersand using that line to extract the delimiter (assumed to be the delimiter for the data). After, all blank lines are removed then the remaining lines in the log file is iterated through to identify the boundaries of the experimental log data. Data is assumed to to contain at least one digit or float (which includes NaN).- log_filepath