Code Monkey home page Code Monkey logo

eegutils's Issues

eeg_combine for eeg_tfr

Fails when unequal number of epochs.
Does not check order of epochs across objects, which causes problems with averaged eeg_tfr objects.
Need to implement much more detailed checking of objects since eeg_tfr uses matrices internally

eggcap color for multiple electrodes

Hi,
I was trying to select another color for 6 electrodes in 10-20 system; however, r only changes the color for 3 of them. I'm pretty sure it's a minor issue, but since I was not able to solve it, I came here to ask you guys.

`data(eegcoord)
myelectrodes <- rep("light blue",87)
enames <- rownames(eegcoord)
myelectrodes[enames=="A1"] <- "red"
myelectrodes[enames=="A2"] <- "red"
myelectrodes[enames=="C4"] <- "red"
myelectrodes[enames=="F7"] <- "red"
myelectrodes[enames=="O1"] <- "red"
myelectrodes[enames=="O2"] <- "red"

eegcap(electrodes = "10-20", col.point = myelectrodes)`

TODO:

  • Decompose topoplot and other plotting functions into parts and add as ggplot extensions (e.g. geom_topo) as well as monolothic functions mostly done but contours are a problem...
  • Rewrite functions as S3 methods where possible/necessary
  • New object classes for PSD, ICA etc. (new ICA and TFR classes added)
  • Add artefact detection (absolute threshholding, probability measures etc)
  • Implement FASTER (mostly done - only ICA and GA left...)
  • Channel interpolation Spherical spline implemented
  • Improve data browsing speed
  • Allow visualization of artefact rejections
  • Implement multiple ICA methods and browsing of those methods - SOBI, fastica, infomax available
  • Add methods for removal of ICA components
  • Add frequency analyses (PSD added, TFR in progress) - Morlet wavelet TFR added
  • Reducing the number of external Depends to <=20
  • Better tidyverse support - e.g. wrappers around dplyr functions, currently some done for select(), filter(), mutate, and rename
  • Decide on format of channel locations.
  • DOCUMENTATION, DOCUMENTATION, DOCUMENTATION! Vignettes etc...
  • Improve implementation of glm fitting - allow adding baseline as a covariate etc-
  • add boundaries when combining continuous data across files
  • tests for more complex objects (e.g. groups, TFR evokeds etc)
  • Allow log-spacing of frequencies in compute_tfr() and check how plot_tfr() can handle them
  • Improve S3 class documentation

Reading EDF/BDF is slow

edfReader seems to be slow considering the size of the files being loaded; replace with custom routines?

epoching data sometimes fails

Epoching data sometimes causes problems when requested time limits don't hit zero at a given sampling rate. E.g. epoch limits of -.3, .75 fail at 256 Hz.

topoplot does not scale

Topoplots are a great feature of eegUtils, but forcing them to look nice on a 5x5cm figure is a pain (requires hacks using ggplot_build() / ggplot_gtable()). It would be great if topoplot had an optional argument with a scaling factor and have all line weights in contours be based on this factor.

erp_scalp ignoring chan_info

erp_scalp should use chan_info structure when it's available, instead of always trying to overwrite the montage. Needs a broader rework to ensure proper use of canvas space etc.

Plot ERPs on the scalp

Hi,

Any plans on implementing a function for a plot that shows a topographic arrangement of ERPs? I've been working on one here, and can send in a pull request if it's a feature you'd like to add to eegUtils.

Here's sample output from the function on my dev branch:

erp_scalp(data, color = "group")

rplot

Installation code wrong in README.md

Just went to install the package by copy/pasting the code from the README.md and got the error Error: 'install_packages' is not an exported object from 'namespace:devtools'. It was easy to fix by replacing the install_packageswith install_github, but I figured you might want to know so you can update the README with the proper command. Thanks for creating/maintaining the package!

rm_baseline() sometimes does not properly respect group_by

Noticed with normal data.frame, not eeg_data class - seems to ignore grouping by epoch sometimes, thus baseline corrects with the average across all epochs instead of the average from each epoch.

edit - seems to be an awkward interaction with data that's already grouped on input.

BIDS compatibility

Now that BIDS-EEG is being formalized, time to start making my data structures more compatible

OSX tests fail

Dear Matt,

The test-ICA.R tests are failing on OSX.

── 1. Failure: topoplots for ICA work (@test-ICA.R#14)  ───────────────────────
Figures don't match: topographical-plot-for-sobi.svg


── 2. Failure: ICA timecourses work (@test-ICA.R#26)  ─────────────────────────
Figures don't match: timecourse-over-one-component.svg


── 3. Failure: component removal works (@test-ICA.R#39)  ──────────────────────
Figures don't match: removed-one-component.svg


── 4. Failure: component removal works (@test-ICA.R#41)  ──────────────────────
Figures don't match: reconstruct-all.svg

Any idea what is causing this?

Thanks!

Trouble using electrode locations from R package eegkit

I am having trouble with topoplot() when using electrode locations provided in the eegkit R package (data(eegcoord, package = "eegkit")). I assume those locations are fairly standard.

Here's the result when I use those locations, with data d:

topoplot(d)

rplot

I have fixed these issues and made topoplot() load these locations by default if locations are not passed in data. Resulting figure is here (I've added a few options e.g. argument for contours):

topoplot(d, rmax = 10, chan_marker = "name", contour=F)

better

The fixes can be found here: https://github.com/mvuorre/eegUtils. I haven't submitted a pull request because I'm not sure if you'd want to use these electrode locations as default (or if the changes are good overall.) Let me know if you'd like me to submit it, though.

Thanks for the great function(s)!

Installation issue (macOS Catalina problem?)

Hi,

I've just tried to install eegUtils via RStudio (R version 3.6.1) and I got this error:

Error: Failed to install 'eegUtils' from GitHub:
(converted from warning) unable to access index for repository https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES'

I suspect it might be related to the fact that I'm currently using macOS Catalina, since I didn't encounter any error in the past when using eegUtils. What do you think?

Many thanks for your time.
Alberto

psd output fixes needed

make sure when epochs are kept that epoch number is numeric and and any epoch labels are included

handling missing channel information

eeg_FASTER and interp_elecs don't correctly handle channels that are either not in the channel info at all, or have elements missing (e.g. co-ordinates are NA)

import_raw error when the edf file contains annotations

I imported many edf files without problems using import_raw, but noticed that some files produced an error.

I realized that these files contain annotations. The error does not occur when the code in import_raw:

data <- edfReader::readEdfSignals(edfReader::readEdfHeader(file_name))

is replaced by

data <- edfReader::readEdfSignals(edfReader::readEdfHeader(file_name), signals = "Ordinary")

Other montages

I work in a lab that has custom caps and electrode locations. Is it possible to define/enter custom electrode locations so that topoplot() can display maps properly?

Support for file formats other than BDF/EDF

Currently import_raw() only handles BDF/EDF files, thanks to the edfReader package. I'd like to extend support to other file formats, such as those from EGI or Neuroscan systems.

eeg_filter() should have parameter to adapt demeaning behavior

when using eeg_filter() on non-raw data (e.g., for plotting) it would be handy to manipulate (or at least deactivate) the demeaning feature of the function.
In a concrete case: when lp-filtering epoched data for plotting, epochs with high amplitude slow negative potentials (lasting for the bigger part of the epoch) were "pushed upwards", i.e. baseline signal was constant above x-axis. For such a case, it would be good to be able to either deactivate the demeaning or have a parameter that is forwarded to rm_baseline() to specify the baseline time window (i.e., time_lim).

Tibble 2.0 issues

Getting warnings when running electrode_locations:

The `x` argument of `as_tibble.matrix()` must have column names if `.name_repair` is omitted as of tibble 2.0.0.
Using compatibility `.name_repair`.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.