Do not duplicate

I ran into the following error when trying to use a script to make Marsbar extract betas

Error in pr_stat_compute at 34

Indices too large for contrast structure

This problem occurred when I was trying to extract the betas for an unusual participant who had an empty bin for one condition, and for whom I had therefore had to manually alter the set of contrasts.  In doing this, it turns out that I had inadvertently duplicated one contrast vector.  Although the names were different, the number of contrasts had been amended to reflect the number of unique contrast vectors in SPM.xCon but not in Marsbar’s D, meaning that pr_stat_compute’s ‘xCon = SPM.xCon’ (line 23), did not return the same value as my own script’s ‘xCon = get_contrasts(D)’.  This was causing the two xCons to differ in their length and the resultant error in pr_stat_compute.

The solution lay in removing the duplicate contrasts from the contrast specification for that participant.

Image via Wikipedia

Clare Rathbone, a memory researcher at Oxford Brookes, recently sent me the following Unsolicited Advice article by Julianne Dalcanton on how to navigate the early stages of writing a grant proposal:

Discover Magazine Blog:

In the blog, Dalcanton suggests a method for a) overcoming the scary blank-page and b) vetting grant proposal ideas at the earliest possible stage. as follows:

…I start a stupid ASCII file with two sections:

  1. Selling Points
  2. Potential Weaknesses to Shore Up

I then start filling out each with short bullet points listing every possible argument for or against what I’m proposing.

Dalcanton suggests working on this ascii file for half a day or so and then doing something that would never have crossed my mind – sending it to the experts and collaborators from whom you might normally solicit feedback at a much later stage.

Get their feedback about what they think the strongest selling points are, what their additional concerns are, and what arguments they would use to shore up weaknesses. Expand the file accordingly, so you have a record of everything that you think needs to go into the proposal. You’ll probably find that it’s a huge time savings to get this to your collaborators in this form, before you have a 10 page latex file with embedded figures.

This is brilliant. You seek feedback on the core idea, so you don’t have to write proposals that simply won’t appeal to reviewers. Now it’s obvious that this is what I should be trying to do with grant proposal ideas anyway, but the ascii file provides a way of seeking peer-review at this early stage and overcoming the myopic optimism can all to easily cloud judgement and drive a great deal of personal investment in an idea that simply won’t fly.

[gigya src=”” type=”application/x-shockwave-flash” allowfullscreen=”true” allowscriptaccess=”always” width=”550″ height=”400″ bgcolor=”#ffffff” flashvars=”prezi_id=ovkocojtyccv&lock_to_path=0&color=ffffff&autoplay=no&autohide_ctrls=0″]

Prezi ‘slides’ for a talk I’ll be giving at the Research Away Day next Wednesday.

Having experimented with prezi a fair amount recently, I’ve been looking at ways to showcase the output on this blog, hosted on  Pasting the standard embed code into the ‘HTML editor’ just results in a garbled mess of html code being displayed on the blog post, so I searched for and found a way of doing this successfully.

The prezi community provides the answer below:

Here are the instructions from bookbagdesigner, posted in January 2011.

It can take a while to find the appropriate bit of the embed code described in step 2.  But once you’ve found it, steps 3 and 4 are straightforward and the results are a success.

Since setting up lab in St Andrews I’ve consistently run into a DICOM Import Error that causes the process to terminate about half-way through. I finally fixed the problem today after a quick search on the SPM mailing list.

The error I was receiving was as follows:

Running ‘DICOM Import’
Changing directory to: D:Akira Cue Framing 2011PP03
Failed ‘DICOM Import’
Error using ==> horzcat
CAT arguments dimensions are not consistent.
In file “C:spm8spm_dicom_convert.m” (v4213), function “spm_dicom_convert” at line 61.
In file “C:spm8configspm_run_dicom.m” (v2094), function “spm_run_dicom” at line 32.

The following modules did not run:
Failed: DICOM Import

??? Error using ==> cfg_util at 835
Job execution failed. The full log of this run can be found in MATLAB command window, starting with the lines (look for the line
showing the exact #job as displayed in this error message)
Running job #[X]

Error in ==> spm_jobman at 208

??? Error while evaluating uicontrol Callback

This was a little mysterious, as the appropriate number of nifti files appeared to be left after the process terminated unexpectedly.

The following link suggested an SPM code tweak that might fix it:

The proposed fix from John Ashburner simply requires changing line 61 of spm_dicom_convert.m from:

out.files = [fmos fstd fspe];


out.files = [fmos(:); fstd(:); fspe(:)];

Works like a charm!


Out with the old, in with the new: Novelty judgements as a translational tool to assess healthy ageing

Funding Notes:  The student will require a minimum of an upper second class Hons Degree and is open to UK and European Community students. Fees and stipend are covered for UK students. EU students can get fees-only covered if they have not studied in UK and can get full stipend and fees if they have studied here for 3 or more years.

Application Deadline: 31st January, 2012

Supervisors: Drs James Ainge and Akira O’Connor, University of St Andrews, with Dr Rosamund Langston, University of Dundee

Project Description: How we experience memory shapes how we experience the world. Just as learning to trust our memories in childhood empowers us to explore our surroundings, learning that our memories have become untrustworthy leads to reduced independence and diminished quality of life. The deleterious effects of memory decline are most often associated with ageing in older adulthood. Although memory decline is commonly conceptualised as a reduced ability to detect ‘oldness’, we will build on recent advances across multiple fields to explore age-related memory decline as a deficit in ‘novelty’ detection (refs. 1-3). The proposed project will combine state of the art in vivo behavioural neuroscience techniques with neuropsychology and functional neuroimaging to explore the ability to detect novel stimuli across the lifespan of both rodents and humans. This multidisciplinary approach will examine how the behavioural consequences of ageing (e.g. reduced environmental interaction) are driven by age-related changes to the structure and function of memory systems across species. This combined approach will provide excellent training for the student in a variety of techniques, particularly strategically important in vivo skills, to enable a systems level understanding of memory mechanisms and how they degrade with normal ageing.

Burke SN, Wallace JL, Nematollah S, Uprety AR & Barnes CA (2010). Pattern separation deficits may contribute to age- associated recognition impairments. Behavioral Neuroscience, 124, 559-73.
O’Connor AR, Lever C & Moulin CJA (2010). Novel insights into false recollection: A model of déjà vécu. Cognitive Neuropsychiatry, 15, 118-144.
O’Connor AR, Guhl EN, Cox JC, Dobbins IG (2011). Some memories are odder than others: Judgements of episodic oddity violate known decision rules. Journal of Memory and Language, 64, 299-315.

Enquiries by e-mail to James AingeAkira O’Connor or Rosamund Langston.

As time passes, I feel a growing unease with what I have previously written.  The further I am temporally from the moment of expression, the less connected to it I feel.  The more likely I am to wish the expression didn’t exist.

But, everything I write is an approximation of what I am trying to convey at that moment.  Sometimes it is a very good approximation.  Other times I get side-tracked by something peripheral and it misses the mark. Inevitably, my thoughts about what I was trying to convey will change, will mature or will be less keenly felt. The ever-growing sum of my thoughts makes expressions I work on for longer more cautious or more balanced.  It makes spontaneous expression more excited, more inflammatory. Purer? In that moment, at least.

None of this invalidates the expression, whenever it is revisited.

Sometimes it’s just harder to recognise the current self in the articulations of a former self.

Academics are a diverse bunch. Those in my department of just under 40 lecturers and teaching fellows span an estimated 40-year age-range, at least 10 different nationalities and the full spectrum of technological competence. Some were introduced to e-mail in their teens, others in their 40s – all of us use it as the primary mode of communicating with students. A student making e-mail contact with an academic therefore needs to make a few allowances for the recipient.

Below are a few thing to watch out for when e-mailing academics for the first time.

1) Use your university-provided e-mail account.
It’s your ‘work’ e-mail, so set it up correctly (make sure you change the account setting to display your sender name etc.) and use it for work-related correspondence. I don’t know what to think when I get an e-mail from

2) Use an appropriate greeting.
“Dear <title> <surname>,”  will never let you down. Yes, there are some who believe that it’s too formal for the medium, but you’re e-mailing someone about whom you know very little.  They might like being addressed this formally, they might not care, but they certainly won’t think any worse of you doing it. In my view, the less formal “Hello <title> <surname>” is equally appropriate, though straying into “Hi” or “Hey” gets risky – I don’t mind “Hi” but I really hate receiving e-mails that open with “Hey” from someone I don’t know. The total absence of a greeting offends me.

3) Don’t get your academic’s gender wrong.
I have a name that ends in the letter A.  As a result of a Western European naming heuristic, people often assume that I am female. This assumption is fine from telemarketers and those who want to send me trial subscriptions to Red magazine, but not students.  If you’re not a professional cold-caller, getting your e-mail recipient’s gender wrong just suggests that you’re lazy. If you’ve haven’t heard the name before, Google it.

4) Don’t get your academic’s title wrong.
Is the recipient’s gender even relevant to your e-mail? If you’re e-mailing an academic with “Dear Mr/Mrs/Ms”,  you’re already taking an etiquette risk. Some academics get very tetchy about their title (Dr, Professor). If in doubt, just Google it. The search term <first name> <surname> <institution> usually does the trick.  If they have PhD or Dr on their page, use “Dr”.  If they have Prof or Professor on their page, use “Prof”.  If none of these apply, use a gender-appropriate title.

5) Don’t make inappropriate gender assumptions about your academic.
Women get PhDs.  Women also get made Professor. I don’t know anyone who would argue with these facts, but coffee-room conversation suggests that female academics have to deal with a greater number of inappropriately-written e-mails than their male colleagues.

6) Use appropriate language to communicate.
Communicating over e-mail isn’t like communicating over twitter or facebook (at least your academic probably doesn’t think so). Yes, keep it concise, but not so concise that you have to omit vowels.  Smileys in your first e-mail may make your recipient >:  And be polite… please?

7) Sign off.
Something more formal than “Cheers” usually does the trick. “Regards,” “Best,” and “Thanks,” are all fine by me, though I would err on the side of “Regards,” if you started with “Dear”.  And do sign off with your name (first or first and surname) and no kisses. Just friends, ok?

These recommendations become a little looser as you build a history of communication with your academic.  In second e-mails you can probably ditch the <title> <surname> business in favour of the academic’s sign-off name or something appropriate to the tone of their response (or slightly more formal).  For instance, if your academic signs off with  “Best, Akira” or “Thanks, A” feel free to follow-up with “Dear Akira,” or “Hello Akira,”.  If your academic responds with “Hey,” they have absolutely no reason to get offended by a similar reply from you.

Just make sure you get that first e-mail right. It does matter.  You’re going to be relying on tutors, project supervisors and lecturers to give you guidance and opportunities during and after university. Making a bad first-impression isn’t insurmountable, but it’s definitely something you can do without.