What I cannot create, I do not understand.   -Richard Feynman

The above is probably my favourite quote. As someone who does research in cognitive neuroscience, I find that it is often too easy to rely on established tools, without needing a grasp of the technicalities involved. Building your own tools is a good way of understanding the intricacies of your data. This idea has led me to play around with programming and tinkering with somewhat unexpected programs and hardware. While my actual research projects can be found here, this website is designed as a repository of sorts for these kinds of DIY projects, some of which have been incorporated into actual research publications or conference posters.

If there are any queries, or code requests, feel free to contact me (syaheed'at'gmail.com). Github here

Side note, this website is hosted on a Linux cloud service. I find that it is really useful to have the ability to SSH in and make edits from any computer. Additionally, I can also run simulations on the server without bogging down my own computers.

- Syaheed

My attempt at categorising these side projects:

Shiny demos  |  Games as experiments  |  Technical demos  |  Experiment Programming Hacks  |  General tricks

Shiny demos

Every so often I find myself having to explain concepts that would be aided with some illustrations. In such cases, it would be great if I can just pull out my phone and have an interactive plot I can use as a demonstration. R shiny is a really good tool for this. Here are some examples:

Online V1 Model

Online Drift Diffusion Model

A custom-built survey/quiz platform. Just swap out the .csv!

Games as experiments

Computer-based cognitive experiments, are essentially video games (only, really boring ones). What data can we mine from actual games? Here are some examples of games which might give us usable data:

Tetris: A cognitive test to measure learning?

Missle Command / Asteroids: Can we get precision data from a video game?

Pong: Because no game collection is complete without it! (Coded entirely in javascript)

Technical demos

Sometimes research can benefit by going beyond the standard tools of the trade. This might take the form of new hardware implementations, or new programs to use, or sometimes, going online with the data collection. Here are some possibilities:

A cheap analog input device: An Xbox controller

Using game engines: Plinko with physics (Linux and Chrome unfortunately not supported) Click here for a GIF.

Using pygame and pyjs: How to obtain precision data from a webpage

A computer vision test to simulate V1 population coding

Experiment Programming Hacks

Sometimes there are ways of setting up the experiment to record more data, things that you only realise when going beyond GUI-based tools like EPrime and delve into actual programming. Here are some 'hacks' I've learnt:

Is your polling method frame-trapped? Try threading.

Does Eprime's data format bother you? Scrape the log file!

What does binary have to do with programming EEG studies?

Is a Raspberry Pi (ver2) good enough to run experiments on? A case for stimulus timings.

General tricks

Just some general tricks that weren't obvious to me, but ended up being of use.

How do we embed Github code?

Using R to produce animations

Using Matlab's image processing toolbox to reslice dicom images