EEG | Python toolbox for EEG analysis | Dataset library

 by   hadrienj Python Version: Current License: MIT

kandi X-RAY | EEG Summary

kandi X-RAY | EEG Summary

EEG is a Python library typically used in Artificial Intelligence, Dataset applications. EEG has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.

With most recording devices, EEG data are structured as a big matrix of shape (time x electrodes). One electrode channel generaly corresponds to the trigger channel used to synchronise the participant response or the stimuli to the EEG signal. The raw EEG can be split in chunks of time according to this trigger channel. It is then possible to average EEG signal coming from same condition for instance. These functions can be used to load data, do some kind of processing, plot etc.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              EEG has a low active ecosystem.
              It has 30 star(s) with 7 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 0 have been closed. On average issues are closed in 294 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of EEG is current.

            kandi-Quality Quality

              EEG has 0 bugs and 0 code smells.

            kandi-Security Security

              EEG has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              EEG code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              EEG is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              EEG releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed EEG and discovered the below as its top functions. This is intended to give you an instant insight into EEG implemented functionality, and help decide if they suit your requirements.
            • Plot the features of electrodes .
            • Fetch behavior data from CouchDB
            • Plot a subset of data
            • Calculate the average trials across trials .
            • Apply the filter and downsampling to the data .
            • Plot a FT .
            • Plot the mean trials of electrodes .
            • Get trial data .
            • Calculate a cheby - bandpass filter .
            • Compute the pick energy of the given data .
            Get all kandi verified functions for this library.

            EEG Key Features

            No Key Features are available at this moment for EEG.

            EEG Examples and Code Snippets

            No Code Snippets are available at this moment for EEG.

            Community Discussions

            QUESTION

            Is there a MNE Python function that can enable me to use only part of the EEG data?
            Asked 2022-Mar-26 at 16:25

            I currently have an EEG.set file with data from 40 minutes of measurement. I only need 20 minutes (from somewhere in the middle) of which I know the starting and ending timestamps. Is there a function within the MNE package so I can select the part of the data that I'll need?

            ...

            ANSWER

            Answered 2022-Mar-26 at 16:25

            Mne has a crop function to cut the eeg signal between your desire timestamps. You apply it to your raw data.

            https://mne.tools/stable/generated/mne.io.Raw.html#mne.io.Raw.crop

            Source https://stackoverflow.com/questions/71499896

            QUESTION

            How to plot ICA components extracted from EEG signal?
            Asked 2022-Mar-24 at 10:13

            I'm following the answer to this question and this scikit-learn tutorial to remove artifacts from an EEG signal. They seem simple enough, and I'm surely missing something obvious here.

            The components extracted don't have the same length as my signal. I have 88 channels of several hours of recordings, so the shape of my signal matrix is (88, 8088516). Yet the output of ICA is (88, 88). In addition to being so short, each component seems to capture very large, noisy-looking deflections (so out of 88 components only a couple actually look like signal, the rest look like noise). I also would have expected only a few components to look noisy. I suspect I'm doing something wrong here?

            The matrix of (channels x samples) has shape (88, 8088516).

            Sample code (just using a random matrix for minimum working purposes):

            ...

            ANSWER

            Answered 2022-Mar-24 at 10:13

            You need to run the fit_transform on the transpose of your samples_matrix instead of the samples_matrix itself (so provide a 8088516 x 88 matrix instead of an 88x8088516 to the method).

            Source https://stackoverflow.com/questions/71583770

            QUESTION

            How to read .eeg file from BrainVision Core Data Format in python?
            Asked 2022-Mar-22 at 16:29

            I have a dataset in BrainVision Core Data Format which consists of the header file (.vhdr), marker file (.vmrk), and raw EEG data (.eeg) file for each subject. I know that python has mne.io.read_raw_brainvision() function which reads header file and returns a raw object containing BrainVision data. I do not know how to proceed after that or how can I read .eeg file. Thanks

            ...

            ANSWER

            Answered 2022-Mar-22 at 16:29

            Overall, MNE Python has a great tutorial on handling raw EEG data: https://mne.tools/stable/auto_tutorials/raw/10_raw_overview.html#the-raw-data-structure-continuous-data

            You can follow this tutorial and use the file loading with mne.io.read_raw_brainvision() as used in this more specific tutorial that happens to work with sample data in the BrainVision Core Data Format: https://mne.tools/stable/auto_tutorials/time-freq/50_ssvep.html#frequency-tagging-basic-analysis-of-an-ssvep-vssr-dataset

            Source https://stackoverflow.com/questions/71543278

            QUESTION

            Apply changes to dataframes in a dict thanks to a for loop: how to do it?
            Asked 2022-Mar-16 at 10:20

            I can't apply the alterations I make to dataframes inside a dictionary. The changes are done with a for loop.

            The problem is that although the loop works because the single iterated df makes the changes, they do not apply to the dictionary they are in. The end goal is to create a merge of all the dataframes since they come from different excel sheets and sheets. Here the code:

            1. Import the two excel files, assigning None to the Sheet_Name parameter in order to import all the sheets of the document into a dict. I have 8 sheet in EEG excel file and 5 in SC file

              ...

            ANSWER

            Answered 2022-Mar-16 at 10:20

            You need to map your modified dataframe back into your dictionary:

            Source https://stackoverflow.com/questions/71494659

            QUESTION

            How can I use row index values as column for dataframe?
            Asked 2022-Mar-06 at 14:54

            So, I collected data from 21 participants with 16 EEG channels and I extracted the Gamma band. My current dataframe looks like this ([336 rows x 2 columns]):

            Channels Gamma Fp1 0.345908 Fp2 0.121232 F3 0.213212 ..... ....

            Now I want to transpose it in such a way, that I have the gamma values for each channel in one column. Like this:

            Fp1 Fp2 F3 .... Oz 0.067005 0.345908 0.207540 .... 0.013512 0.137292 0.121232 0.121210 .... 0.121111 0.112121 0.213212 0.123443 .... 0.432233

            when I just transpose the dataframe, then I get one row with all channels next to each other:

            Fp1 Fp1 Fp1 .... Oz Oz Oz 0.067005 0.345908 0.207540 .... 0.013512 0.12123 0.112423

            I looked at pd.melt but I can't figure it out. Can someone help?

            Thank you in advance!

            ...

            ANSWER

            Answered 2022-Mar-06 at 14:54

            One approach is to group by the Channels and then set these groups as columns of your new dataframe. Assuming following dataframe:

            Source https://stackoverflow.com/questions/71371204

            QUESTION

            AttributeError: 'Tensor' object has no attribute 'is_initialized'
            Asked 2022-Feb-24 at 02:41

            I got this error when I try to fit the model. I tried to use a single GPU version but it remains. If I upgrade to TensorFlow 2 it will be solved but I need to keep it that in this version of TensorFlow.

            This is the code for the model that I have used. This model consists of different layers.

            ...

            ANSWER

            Answered 2022-Feb-24 at 02:41

            This is likely an incompatibility between your version of TF and Keras. Daniel Möller got you on the right path but tf.keras is a TF2 thing, and you are using TF1, so your solution will be different.

            What you need to do is install a version of Keras that is compatible with TF 1.14. According to pypi, TF 1.14 was released June 18, 2019.

            https://pypi.org/project/tensorflow/#history

            You should do a grid search of the Keras versions just before and after that date.

            https://pypi.org/project/keras/#history

            I'd go with these Keras versions.

            2.2.4 2.2.5 2.3.1 2.4.1

            Install these versions using for example

            Source https://stackoverflow.com/questions/71159722

            QUESTION

            Python Numpy CAR implementation - ValueError: shapes not aligned
            Asked 2022-Feb-05 at 00:51

            I am trying to implement a Common Average Reference function in python. The idea is to compute the average of the signal at all EEG channels and subtract it from the EEG signal at every channels for every time point. The input of this function is a NumPy array called trials. Trials is a 3D array that contains EEG data in this form: (trials x time x channels). for example:

            ...

            ANSWER

            Answered 2022-Feb-05 at 00:51

            WHOOPS - I didn't understand the definition of Common Average Reference. As pointed out in Warren Weckesser's comment, the CAR is the value at each electrode, not over time. So the average should be calculated over the channels dimension. Use keepdims=True to make the shape compatible so that the subtraction can still be done with broadcasting:

            Source https://stackoverflow.com/questions/70992167

            QUESTION

            How to save a list of files names to CSV file in a FOR LOOP?
            Asked 2022-Jan-18 at 02:46

            I have a CSV file with data (IDs) listed in one column and I added the extension to each ID via a for loop and then I would like to save the newly generated list in for loop to a CSV file. See the code. CSV file Data

            ...

            ANSWER

            Answered 2022-Jan-18 at 02:46

            You don't even need looping for this:

            Source https://stackoverflow.com/questions/70749027

            QUESTION

            Define a Topographic EEG/MEG plot function using Julia
            Asked 2022-Jan-16 at 09:48

            Is it possible to define a function like plot_topography in MatLab to draw the Topographic EEG/MEG plot in Julia?

            ...

            ANSWER

            Answered 2022-Jan-16 at 09:48

            The following image is what I have achieved with the code posted here.

            Source https://stackoverflow.com/questions/70623790

            QUESTION

            Reading from FTDI D2XX device using Python3 on Ubuntu 20.04
            Asked 2022-Jan-05 at 19:58

            I am working with an FTDI device that has native software for Windows, but nothing available for Linux. I am trying to read data from the device using pylibftdi. I would like to translate C# code that is provided by the device manufacturer and purportedly works (unclear if this is true) but have not been successful. So far I have done the following:

            1. Installed the Linux D2XX drivers based on these instructions. Installation was successful.

            2. Followed the directions here and here to enable the FTDI device to connect to the Linux system.

            3. After plugging the FTDI device into the Linux system USB port:

            ...

            ANSWER

            Answered 2022-Jan-05 at 19:58

            As response to the comment and as an follow up answer:

            I cannot confirm the claim that D2XX is more reliable than the VCP from personal experience and the second one is only partially correct: one can e.g. use the VID:PID combination in most cases IIRC.

            I would highly recommend to stick to the easier VCP + pyserial solution. But if you really want (or need to) use pylibftdi, you can take a look at https://github.com/codedstructure/pylibftdi/blob/4662ebe069eefd5a89709d4165e3be808cad636c/docs/advanced_usage.rst - it describes how to access none exposed functionality directly. The naming is slightly different e.g. ftdi_setflowctrl instead of SetFlowControl but you will figure it out. Just check https://www.intra2net.com/en/developer/libftdi/documentation/ftdi_8c.html .

            Source https://stackoverflow.com/questions/70574095

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install EEG

            You can download it from GitHub.
            You can use EEG like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/hadrienj/EEG.git

          • CLI

            gh repo clone hadrienj/EEG

          • sshUrl

            git@github.com:hadrienj/EEG.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Dataset Libraries

            datasets

            by huggingface

            gods

            by emirpasic

            covid19india-react

            by covid19india

            doccano

            by doccano

            Try Top Libraries by hadrienj

            deepLearningBook-Notes

            by hadrienjJupyter Notebook

            Preprocessing-for-deep-learning

            by hadrienjJupyter Notebook

            hadrienj.github.io

            by hadrienjJavaScript

            StaircaseJS

            by hadrienjJavaScript

            FM-AM

            by hadrienjJavaScript