NeuroKit icon indicating copy to clipboard operation
NeuroKit copied to clipboard

read_xdf error with Shimmer3 recording data.

Open Catonpancake opened this issue 3 months ago • 3 comments

I have trouble using read_xdf function with my physiological data recorded with Shimmer3, and saved with LabRecorder.

With LSL4Unity only recording files, read_xdf worked fine. but when I try to open shimmer3 only recording file or combined recording file with LSL4Unity, both show error message as 1).

I tried various numbers with upsample and fillmissing options, and both did not work.

This might be a simple and stupid question... but since I couldn't figure out it by myself, I would appreciate some help from anyone who knows about the issue.

Thank you!

Error message image

My signal(32 channel) in sigviewer image

Current ECLShimmerCapture Configuration + sampling rate of LSL is 100Hz image

+When opened with sigviewer, it showed the warning message, but did not let me control sampling rate. image

Catonpancake avatar Mar 27 '24 11:03 Catonpancake

Hi 👋 Thanks for reaching out and opening your first issue here! We'll try to come back to you as soon as possible. ❤️ kenobi

welcome[bot] avatar Mar 27 '24 11:03 welcome[bot]

Alright, I managed to solve the issue on my own.

  1. my .xdf data is missing metadata descriptions (desc).

  2. since I couldn't find a way to make Shimmer3 Capture send the metadata description info to LSL, I opted to manually add it myself.

  3. Although pyxdf assisted me in creating a defaultdict for the metadata description, I couldn't figure out how to export it to create an .xdf file containing the manually added descriptions. --> I would appreciate to let me know if this is wrong. I couldn't find the way to export it(with changed value, separated to streams and header by pyxdf's load_xdf function) but maybe I just missed it.

  4. Therefore, I made modifications to the read_xdf function locally so that it can retrieve the metadata description value (defaultdict) in cases where it is missing.

Since the current read_xdf function cannot handle the missing metadata description issue, I suggest adding a method to address it, thus avoiding the need for significant detours in cases like mine.

I believe there is a more elegant solution, but here is my somewhat crude approach.

image

Catonpancake avatar Mar 29 '24 14:03 Catonpancake

Great, could you open a PR with this change?

DominiqueMakowski avatar Mar 29 '24 15:03 DominiqueMakowski