logfile_parser.swainlab_parser

Description of new logfile:

All three conditions are concatenated in a single file, in this order:
  • Experiment basic information (URL in acquisition PC, project, user input)

  • Acquisition settings

  • Experiment start

The section separators are: —–Acquisition settings—– —–Experiment started—–

And for a successfully finished experiment we get:

YYYY-MM-DD HH:mm:ss,ms*3 Image acquisition complete WeekDay Mon Day HH:mm:ss,ms*3 YYYY

For example: 2022-09-30 05:40:59,765 Image acquisition complete Fri Sep 30 05:40:59 2022

Data to extract: * Basic information

  • Experiment details, which may indicate technical issues

  • GIT commit

  • (Not working as of 2022/10/03, but projects and tags)

  • Basic information

New grammar

  • Tables are assumed to end with an empty line.

Functions

extract_header(filepath)

fields_to_dict_or_table(result)

parse_fields(string, start_trigger[, ...])

Fields are parsed as key: value

parse_from_grammar(filepath, grammar)

parse_from_swainlab_grammar(filepath)

parse_table(string, start_trigger)

Parse csv-like table

parse_x(string, type, **kwargs)

table_to_df(result)

Exceptions

HeaderEndNotFound(message, errors)