GithubHelp home page GithubHelp logo

fahrenfort / adam Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 15.0 25.52 MB

the Amsterdam Decoding And Modeling (ADAM) toolbox

License: Other

MATLAB 66.05% M 1.05% Java 0.02% HTML 32.70% PHP 0.16% CSS 0.02%

adam's People

Contributors

arnodelorme avatar fahrenfort avatar joramvd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

adam's Issues

Error running adam_detrend_and_epoch

Hello,

Thank you for the toolbox !
I amy trying to run adam_detrend_and_epoch (Matlab R2018b, ADAM 1.13 and EEGLAB2021.0).

The function stops at this point:

Multiplot limited to 12 plots per figure

When plotting temporal generalisation matrices, line 221 in adam_plot_MVPA seems to limit the number of plots to 12. This only happens when a plot order is specified, although when plotting temporal generalisation matrices, the line_colors argument does not seem relevant.

Error running adam_detrend_and_epoch

Hello,

I am trying to run adam_detrend_and_epoch (Matlab R2018b, ADAM 1.13 and EEGLAB2021.0) on MEG data.

The function stops with this error:

[Undefined function or variable 'topcs'.

Error in nt_regw (line 78)
            if nargout>1; z(:,iChan)=x*(topcs*b(iChan,1:size(topcs,2))') + mn(:,iChan); end

Error in nt_detrend (line 87)
    [~,y]=nt_regw(x,r,w);

Error in detrend_and_epoch (line 236)
        [~, w2,~,regressline2] = nt_detrend(tmp,polynomial_order,w1); % then nth order with mask of previous
        step

Error in adam_detrend_and_epoch (line 148)
        detrend_and_epoch(datadir,filenames{cSubj},outputdir, start_epoch, end_epoch, polynomial_order,
        pad_length, start_mask, end_mask, mask_only_current, mask_bad_data, channelpool, remove_bad_chans,
        event_codes);

Error in script (line 23)
adam_detrend_and_epoch(cfg);](url)

Also, I have this warning several times before the function stops.

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =  1.030416e-07. 
> In nt_regw (line 76)
  In nt_detrend (line 87)
  In detrend_and_epoch (line 236)
  In adam_detrend_and_epoch (line 148)
  In script (line 23)

Do you have an idea of what is going wrong?

Thank you very much!

medical use prohibited & GPLv3

Greetings,

on http://www.fahrenfort.com/ADAM.htm one can download the toolbox after filling out a form. It says "Using the toolbox for medical purposes is prohibited."

I did not fill out the form, but found the toolbox here on GitHub (https://github.com/fahrenfort/ADAM/). The license distributed with the toolbox is GPLv3 (LICENSE.txt in the root directory), so I assume that is the applicable license.

The issue is that prohibiting medical use seems to be an additional term, which if I read the GPLv3 (see section 7 and 10) correctly, could be removed by recipients: "If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term"

That would make the prohibition rather pointless; I suggest you consider removing the prohibition altogether. If you are concerned about being sued, please note that the GPLv3 license already covers liability (section 16). If you are concerned about the software being used for medical purposes, please consider to include a notice such as done with AFNI (distributed under GPLv2+), see https://afni.nimh.nih.gov/pub/dist/src/README.copyright:

*** This software was designed to be used only for research purposes. ***
*** Clinical applications are not recommended, and this software has ***
*** NOT been evaluated by the United States FDA for any clinical use. ***

The crucial difference here is recommendation versus prohibition.

Event values in file

Thanks a ton for this awesome tool. The way my data was pre-processed, it only contains relevant epochs. However, possible event values vary across subjects. Is it currently possible to (i) either simply use all event values in a file or (ii) for the code to handle event values as possible but not necessary values? As I have not been able to identify, I would like to suggest this for an enhancement of the tool. Best, Christine

Questions and feature / pull request

Hi,

I am doing some EEG processing and have found your tool to be very useful. There are however a few functionalities that can be useful but aren't implemented, I was wondering if there was a reasoning behind what you chose to include and exclude from your pipeline. Additionally, do you have any design recommendations/preferences if I was to implement these functionalities on my own and push a merge request?

  1. Labs like Steven Luck's usually average multiple trials to increase signal-noise ratio, is there a way of doing this in ADAM? If not is there a theoretical reason?
  2. Is there a way to average statistics of multiple classifiers? For instance, if one has 3 subjects and 4 orientations (60 deg, 120, 210, 330) but wants to decode only orientations that are 90 degrees apart (60 vs 330 and 120 vs 210) and do group level cluster-based permutation testing. Currently, we "double" the subjects and do a single classifier for 6 subjects, can the same result be achieved without this workaround?
  3. Is there a way to load eeglab datasets directly in ADAM? currently, we convert these data to a MAT file, but I assume this functionality already exists and I just failed to figure it out.

Thank you very much!

fieldtrip format required?

I started testing your scripts on my data (.set already epoched, 2 classes). It keeps giving me the error: "Error using read_raw_data('The dimord field seems missing and/or dimensions in the dataset seem to be off. When you are using fieldtrip format, make sure the input files have dimord rpt_chan_time (trial x channel x time).')". I'm not using fieldtrip format. This occurs both using cfg.raw_or_tfr = 'tfr'; or 'raw'. So, I downloaded your data from https://osf.io/eh4u8 and tested on the script made available https://osf.io/chz37 and the very same error occurred. I'm currently using Matlab R2022b. What I'm missing?

Problem with 128-channel Biosemi system (ABC radial layout)

Hi! Thanks for this wonderful toolbox. I have encountered an issue but I'm not sure whether it's an ADAM issue or a FieldTrip issue. In our lab, we use a 128-channel EEG system (Biosemi ActiveTwo) that has an ABC-radial layout (not the 10-20 layout!), and its channel labels are A1-A32, B1-B32, C1-C32, and D1-D32. Unfortunately, ADAM only recognises 8 of these channels (A1 A2 B1 B2 C1 C2 D1 D2). For this reason, I created a bundle in ADAM's select_channels script (I tried to attach the script here but GitHub doesn't let me). These are the relevant new lines:

bundlenames.BIOSEMI_128_ABC = {'A1' 'A2' 'A3' 'A4' 'A5' 'A6' 'A7' 'A8' 'A9' 'A10' 'A11' 'A12' 'A13' 'A14' 'A15' 'A16' 'A17' 'A18' 'A19' 'A20' 'A21' 'A22' 'A23' 'A24' 'A25' ... 'A26' 'A27' 'A28' 'A29' 'A30' 'A31' 'A32' 'B1' 'B2' 'B3' 'B4' 'B5' 'B6' 'B7' 'B8' 'B9' 'B10' 'B11' 'B12' 'B13' 'B14' 'B15' 'B16' 'B17' 'B18' 'B19' 'B20' 'B21' 'B22' 'B23' 'B24' 'B25' ... 'B26' 'B27' 'B28' 'B29' 'B30' 'B31' 'B32' 'C1' 'C2' 'C3' 'C4' 'C5' 'C6' 'C7' 'C8' 'C9' 'C10' 'C11' 'C12' 'C13' 'C14' 'C15' 'C16' 'C17' 'C18' 'C19' 'C20' 'C21' 'C22' 'C23' 'C24' 'C25' ... 'C26' 'C27' 'C28' 'C29' 'C30' 'C31' 'C32' 'D1' 'D2' 'D3' 'D4' 'D5' 'D6' 'D7' 'D8' 'D9' 'D10' 'D11' 'D12' 'D13' 'D14' 'D15' 'D16' 'D17' 'D18' 'D19' 'D20' 'D21' 'D22' 'D23' 'D24' 'D25' ... 'D26' 'D27' 'D28' 'D29' 'D30' 'D31' 'D32'}; % 128-channel Biosemi ABC system

I also created a channel location file - it's already contained in the EEG datasets, but I added it just in case (I also tried to attach this BESA file but GitHub doesn't let me):

% These are the EEG and EOG channels according to the radial ABC definition: if exist('biosemi_128_ABC_chanlocdata','file') load('biosemi_128_ABC_chanlocdata'); else chanlocdata = readlocs(trycapfile,'importmode','native'); % from ABC 128-electrode biosemi system end

Unfortunately, it didn't work. ADAM recognises that there are 128 channels, but it only selects those 8 channels I mentioned above (screenshot attached). Thanks so much for the help!

Renzo
ADAM_channelselectionerror

Limit time window for analysis

One more suggestion for enhancement: it would be perfect if it was possible to limit the time window to be included in the first-level analyses. Often, epochs are longer than the time windows of interest.

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.