Currently, the from_asc() only supports custom regex patterns via the patterns argument, which adds the captured values to columns in the dataframe. It would be useful if we could also extract session-level metadata (e.g., the stimulus randomization order, which we log in the ASC file).
Description of a solution
Add another argument to from_asc() (e.g., metadata_patterns) that accepts custom regular expressions. The captured values should be added to the metadata dictionary returned by parse_eyelink().
The code should probably either warn the user in case there are multiple logged messages that match the pattern, or collect all of them in a list (e.g., {"stimulus_order": ["order1", "order2"], ...})
Description of the problem
Currently, the
from_asc()
only supports custom regex patterns via thepatterns
argument, which adds the captured values to columns in the dataframe. It would be useful if we could also extract session-level metadata (e.g., the stimulus randomization order, which we log in the ASC file).Description of a solution
from_asc()
(e.g.,metadata_patterns
) that accepts custom regular expressions. The captured values should be added to the metadata dictionary returned byparse_eyelink()
.from_asc()
.Sample Code
The code should probably either warn the user in case there are multiple logged messages that match the pattern, or collect all of them in a list (e.g.,
{"stimulus_order": ["order1", "order2"], ...}
)