Hello,
I'm using Brainstorm to review Compumedics ProFusion EEG/EMU recordings. I found and fixed an import problem in in_fopen_compumedics_pfs.m that affects clinical review of seizure and event markers, and wanted to share it before submitting a PR.
Problem 1: Event labels are meaningless. The importer reads the EventString field from the EEGEvent table, the actual annotation text a technologist typed (e.g. "seizure onset", specific EEG findings) but never uses it. Labels are built from the raw numeric EventTypeID instead, so dozens of clinically distinct annotations collapse into one meaningless category.
Problem 2: Marker timing is wrong, and markers from unrelated parts of the recording get imported. StartSecondHi/StartSecondLo encode a 64-bit tick counter anchored to the study's creation_time, which the importer currently misreads as a simple seconds value. I confirmed the correct interpretation against the independently-logged timestamps in the EEGLog table. Because the underlying database stores events for the entire multi-day study, and the importer doesn't filter by which .rda segment is actually loaded, markers from unrelated points in the recording get pulled into whichever segment is open.
Fix: I corrected both issues locally using EventString for labels, decoding StartSecondHi/Lo correctly, and filtering events to the loaded segment's actual time window. Validated against ProFusion's own display labels and marker timing now match exactly.
I suggest that I open a PR with the diff shortly. Known remaining limitation, unrelated to this fix: importing a folder with multiple .rda segments is still unsupported.
Best regards,
Marcel