NeuroKit.py icon indicating copy to clipboard operation
NeuroKit.py copied to clipboard

I can't see my trigger channel on Neurokit

Open ArnaudSteinmetz opened this issue 5 years ago • 5 comments

Hi, i'm both new in python and data processing. I have a EDA file from Biopac ( acq). And when i open it with neurokit it displays only 2 channels: -one is the EDA response -the second is the digital input but equal to 0 all along. The thing is, it's supposed to have 8 triggers. When i try read it with bioread, the 8 triggers are detected. Can someone know why?

Regards,

Arnaud

ArnaudSteinmetz avatar Jun 25 '19 15:06 ArnaudSteinmetz

Hi @ArnaudSteinmetz, welcome to github ☺️

Hum that's weird, because the function to read acknowledge file in neurokit uses bioread. During recording, do these channels actually show on their digital channel (like ____|---|____|----|___)?

Worst case scenario, if you manage to retrieve the timings from bioread, you can still add them a posteriori

DominiqueMakowski avatar Jun 25 '19 15:06 DominiqueMakowski

hi, the thing is i'm in intership and i didn't do the recording. But when i looked at the data on biopac i saw the triggers. I don't remember the exact shape they had.

But i want to proceed anyway is that hard to get the timings from bioread? i recontact you when i know more about that recording ( it may be in some time i'll be away for a few days)

ArnaudSteinmetz avatar Jun 26 '19 07:06 ArnaudSteinmetz

Could you provide me with some example file and a reproducible code so I can reproduce the issue? Thanks!

DominiqueMakowski avatar Jun 27 '19 02:06 DominiqueMakowski

Hi, @DominiqueMakowski ,

Here is the figure i get with pandas after the extraction with neurokit.

plot_for_github Sujet12_PasT.zip

But when i read it with bioread, it gives me this "AcqKnowledge file (rev 128): 9 channels, 2000.0 samples/sec".

As you can see, Bioread detects 9 trigger channels (which is sipposed to be, EDA and 8 trigger channels). But on the graph, NK detectcs only 2= EDA and one digital input (equal to 0 all along).

I give you the few lines i used to read this and the file i used to tru that.

`import mne import neurokit as nk import bioread import matplotlib.pyplot as plt import pandas as pd import numpy as np #%%

df,SR=nk.read_acqknowledge(r"C:\DATA\EDA\Sujet12_PasT",return_sampling_rate=True)

S12=bioread.read_file(r"C:\DATA\EDA\Sujet12_PasT.acq")`

Regards

ArnaudSteinmetz avatar Jun 28 '19 08:06 ArnaudSteinmetz

@ArnaudSteinmetz I hope you found solution ago. That's because neurokit cannot detect the duplicate channel names 'Digital Input' of .acq file. Acqknowledge put the same default names for all digital channels by default. Once you change the separate digital channels to different names (i.e. 'Digital Input 1', 'Digital Input 2'...), You will see the nk.read_acqknowledge function works.

Actually, bioread was impressive to handle duplicate name flawlessly.

iPsych avatar Feb 10 '23 13:02 iPsych