Code Monkey home page Code Monkey logo

camcan-core_fmri_smt's Introduction

CamCAN_fMRI-SMT_events

This repository logs changes (2022 onwards) for Matlab analysis code of Cam-CAN's fMRI SMT task.
Specifically, new appended code (see git commit history) generates new event files (to match Cam-CAN MEG SMT task) that include event onsets for button presses (i.e. Reaction Times; RTs).

Example Output

sub-<CCID>_ses-smt_task-smt_events.tsv

onset duration trial_type
4.13 0.3 AudVid1200
4.41 0 button
6.147 0.3 AudVid300
6.428 0 button
... ... ...
504.063 0.3 AudVid300
504.323 0 button

Note on Missing RTs

RTs that are missing (0ms difference between trial onset & RT) have already been removed using the utilities clean_events.m function:

%% Purpose: Remove any 0ms RTs from an events data table.
%%
%% Arguments:
%% FileName = 'sub-CC110033_ses-smt_task-smt_events.tsv';
%% ========================================================================

function [cleanEvents] = clean_events(FileName)

  d = readtable(FileName,'FileType','text')

  idx = find(strcmp(d.trial_type,'button'));
  for i = 1:length(idx); check(i) = (d.onset(idx(i)) - d.onset(idx(i)-1)) == 0; end

  cleanEvents = d;
  cleanEvents(idx(check),:) = []; %drop RTs that equal 0

end

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.