Code

MRI movieFMRI artifacts and head motion are often detrimental to MRI image analyses and statistical results, but often go unnoticed in standard inspection. Also, how much residual motion is left in the images after motion correction is much easier to grasp with visual inspection. To inspect data fast and efficiently, I created a tool which can display a movie of raw images, difference images, and activation images across time. Results can also be saved as .avi files. The code is quite old and not very clean, but should fulfill its purpose. You can download the code here. This function requires transform_vol.m, a function to convert 3D volumes to an image of 2D slices.

efficiencyEfficient fMRI designs are important for finding effects in an fMRI experiment. Often it is unknown in advance what the optimal stimulus order and optimal time between two events is, and people may use rules-of-thumb such as "I use a random order and a jitter of 4s ± 2s between two events". This approach may lead to fMRI designs that are much less efficient than necessary for the purpose of the study (in other words: this approach may waste scanning time). These tools can be used to inspect the efficiency of an experimental design and possibly maximize design efficiency across a number of iterations.

random walkMany learning tasks are modeled where the value of each option is changed across trials using a random walk. Due to the fact that the walk is random, the rate of change will be different across trials. Ideally, one would like random walks with the same spectral properties for all chains. In addition, it is often desired that the chains are uncorrelated. This function generates such uncorrelated random walks which can be used for multiple value chains within subject, but also for single value chains across multiple subjects.

Disclaimer