Betere Dingen

| 17-03-2014 21:02Independent Component Analysis

I'm playing around with FastICA in Python and decided to make a notebook and share it here, as a reminder for myself on how stuff works, as well as for others to get going quickly.

Here's the notebook: FastICA.

If you don't run Python yourself, you can view it on IPython's nbviewer.

No comments

| 23-05-2013 14:52Yarbus

In his famous paper that was translated to English in 1967, Yarbus showed there was an effect of task on gaze direction. His subject looked at the same painting 7 times, with different assigments, and there are different patterns to be observed in the eye-movement traces:


For the defence of my dissertation, I repeated this experiment and got a similar result:


There is a problem with this way of representing eye-movements though: the fixations are underrepresented, as each pixel can only be painted red once. Saccades are probably overrepresented as well, since the coordinates of samples are simply connected with a red line. The solution to this is to use heatmaps:


And now we can identify another problem: the direction and start- and end-points of the saccades were apparently very informative in the original picture (e.g. when shifting gaze back and forth between faces in the painting). This means that for investigating task-driven gaze, it is probably best to take scanpaths into account, along with gaze distributions.

No comments

| 30-06-2010 16:02Pylab logarithmic colorbars

The one alternative I know is to create a logarithmic colormap for each dataset. I like this solution better.


from pylab import *
from numpy import *

samples = 20

data = rand(samples,samples)

ticklabellocs = arange(0.0,1.2,0.2)
ticklabels = []
for tli in ticklabellocs:
  label = u'%0.3f'%tli

ticklabels[0] = '0'

X, Y = meshgrid(range(samples),range(samples))
myContour = contourf(X,Y,data**0.5,arange(0.0,1.01,0.01),


Clines = contour(X, Y, data, ticklabellocs, colors = '#000000', hold='on')

myCbar = colorbar(myContour, ticks=list(ticklabellocs**0.5))



Pylab Logarithmic Colorbar

No comments

| 25-01-2010 16:58No Jet

The Jet colormap is the default in Matlab, and while it looks colourfull and can hence probably sell expensive products like Matlab, it also distorts data.

  • First, it creates an artificial 'band' of yellow that will only by accident have any meaning in the data.
  • Second, there are some 'edges' between other colours, such as between blue and cyan, even when there is supposed to be a smooth transistion between values.
  • Third, just near the extreme low (dark blue) there is a small part of the colourmap that seem slightly brighter than the values that are supposedly higher (farther away from the low end). If you wouldn't know better this could look like a small local peak in the data.
  • Fourth, if the plot is reduced to it's luminance, either because someone prints your paper on a black and white printer (I estimate 99% of students will do this and lots of people who do not want to waste money or the environment), or if your reader is colourblind, jet no longer has any meaning, since the two extremes now have the same 'colour'. Unfortunately, the edges and bands are still there.

I've illustrated this in the graph here (click for large version):

If you value the truth: do not use jet.

Other colourmaps also have their problems, but if you like your data, or want to tell the truth; please do not use jet.

No comments

| 18-01-2009 18:28FreeBrain

January 3rd 2009 I finally started the Sourceforge project FreeBrain that I'd been thinking about for some time. The purpose is to create a flexible and easy to learn tool for analysing all sorts of signals that neuroscientists measure. The kind of signals we aim at are two-dimensional, so you have some measure over time. This includes EEG, skin-conductance and eye-movements, but excludes fMRI and such.

I have two kinds of reasons to start this project. First, as a student I discovered the disadvantage of using a commercially licensed tool in a large research group; you had to fight for a license. This is very counterproductive of course. I picture the main part of our audience to be undergraduate students in some kind of neuroscience. That's why the tool has to be easy to learn. I also discovered that although we primarily used one piece of software for basic analysis of EEG, more advanced or experimental functions were implemented by each research in a plethora of languages. That's why I personally would like a tool that I can extend to all imaginable applications without a lot of trouble. That's why we use an adaptable plug-in scheme and the open source language Python.

The second kind of reason is that I would like to get some more experience in serious programming. I have never made GUI's, and I have never made software that was directly to be used by others. Another experience related interesting side of this project is that I get to work with some other people on a shared codebase using SVN, which is also new to me.

The first thing we need is a cool slogan and logo...

No comments

| 29-04-2008 11:22Variance over measurements

A long time ago I made a proof for a formula that can be used to calculate the variance of two subpopulations without knowing the individual scores. What is needed is the variance, the average scores and the number of scores of all subpopulations, without the actual scores. This was used to decrease the size of a database. PDF-file.

No comments

| 23-03-2008 19:08The 10-20 system

While browsing through some old files trying to clean up my computer, I found this SVG or PDF of the international 10-20 system for electrode locations.


One comment

| 08-01-2008 21:48My brain

It is finally clear that I have one:

Thanks to an experiment by Marleen Schippers.

No comments

| 22-11-2007 17:57Kauffman network

Click 'read more' to see my little boolean network in an inline frame with an option to comment on it. Or click here to open it in a new window.


No comments

| 31-01-2007 21:35Ye Olde Game of Life

Kijk eens wat ik op zolder vond!
Het heeft allemaal oude lay-out dingen die ik nooit meer gebruik en... JavaScript! Er is ook nog een ander leuk JavaScript, namelijk FrogTalk, misschien dat ik dat ook nog eens in ere herstel.


No comments