christianparet / rabids Goto Github PK
View Code? Open in Web Editor NEWRapid and automated conversion of neuroimaging data to BIDS
Home Page: https://github.com/christianparet/RaBIDS
Rapid and automated conversion of neuroimaging data to BIDS
Home Page: https://github.com/christianparet/RaBIDS
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.
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)
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.