Giter VIP home page Giter VIP logo

rabids's People

Contributors

christianparet avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

rabids's Issues

create_sots did not work with numeric event codes for responses

By mistake, some of our participants were given a keyboard during a task, in which they shouldn't respond. Some of the participants pressed the key once, creating an event with code 1. This creates issues with the create_sots function, particularly with "contains(event_code{k},allcond{i}.OnsetID)", as contains() apparently does not work for numeric objects. This might be only an issue in our particular situation, but could possibly also affect studies which either have similar anomalies or have numeric event codes in some instances.

create_sots: textread deprecated

Matlab recommends not to use textread anymore (see snippet from create_sots below). Textscan would be an alternative. Another option would be to use readcell() to separately extract the variable names for the logfiles and the data extract the data. This way, it might be possible to subset the important variables by their names and not with complex formatting, which might go wrong if stimulus onset files are not identical (e.g., when they have a column for participant IDs at the beginning or not).

[event_type,event_code,event_time] = textread([logfile.folder,filesep,logfile.name],'%*d %s %s %d %*s%*s%*s%*s%*s%*s%*s%*s%*s','headerlines',IgnoreHeaderLines)

problem with create_sots arguments BIDS/free

I couldn't get the create_sots function to run when using the input argument "free". When using the "BIDS" input argument, I ran into error code #15. It worked well when removing the following code chunk:

        filename = [subject,write_ses,LogID,'.log'];
        logfile = dir([logdir,filesep,filename]); 
        % if isempty(logfile)
        %     filename = [prefix,filename];
        %     logfile = dir([logdir,filesep,filename]);
        % else
        %     out{dum,:} = 'Logfile not found.\nWarning #15\nContinue with next session.\n';
        %     return
        % end

Maybe I don't understand something important, but in my case this code chunk first successfully correctly creates the objects "filename" and "logfile", then tests if they were successfully created, and returns an error message if they were successfully created , skipping to the next subject.

My data structure:
In my logfiles folder, each participant has a subfolder, containing only one logfile. The folders are called e.g. 1234 for the first subject, without the "sub-" prefix.

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.