Preparing for Bayesian Mathematics in Python

Preparing for Bayesian Mathematics in Python

In which I run through setting up a Python environment on Windows...

I'm going to preface this post by saying I'm not breaking any new ground here. As is often the case, though, a beginner wanting to set-up an environment to do this will have to go to multiple websites to collect this info so I'm going to distil it into one post.

I am going to talk about Python 2.7 as currently it has the most support for libraries. This method should work equally well for Python 3 but I have not tested this.

Fancy Thesis Tables in LaTeX: An Idiots Guide

Fancy Thesis Tables in LaTeX: An Idiots Guide

In which I provide a template for generating fancy, production quality tables for theses...

LaTeX as I've mentioned previously, is a document preparation system well known for its brilliant equations and can also be utilised to make very nice looking diagrams. The tables it generates, however, while neat are a little lacklustre.  This is aimed as a very simple guide to editing tables (regular LaTeX users may find this tutorial very basic).

Tom 3.5 & Life Plan 2014

In which I talk about fitness and the road ahead...

Tom 3.5

So once again I am unhappy with my level of physical fitness having let it slide a lot with work and other stress getting in the way. I need a new ridiculous goal but first I need to get back to my old fitness levels. I'm back on the old horse having started running everyday again and I've rejoined the gym. Expect a longer post in about 2 weeks time about how things are going.

I'm thinking my next "ridiculous challenge" should either be Tough Mudder or an ultra marathon (~40 miles not one of the 100 mile ones).

Why Tom 3.5? Well my last fitness drive was Tom 3.0. This isn't entirely a new leaf it's just me reminding myself to get back to what I was doing and hopefully take it further.

Life Plan (2014)

These are my goals for the next 10 years. I'm going to start posting the one year goals each January instead of having fixed New Year's Resolutions.

This Year:

  • Start learning Guitar (again)
  • Start learning Piano
  • Get a job
  • Finish my PhD
  • Don’t have a fat graduation photo
  • Receive my QSA at Windsor
  • Receive my DofE Gold
  • Write more short stories
  • Enroll on another marathon/Tough Mudder

In 5 Years:

  • Be earning £40k+
  • Be married or almost married
  • Have a published book
  • Have worked towards grades in Piano
  • Grade 5 music theory

In 10 Years:

  • Have children
  • Grade 8 Piano
  • Have several published novels


So I'm in full thesis writing mode at the moment but that doesn't mean I'm constantly writing. I do procrastinate (though usually with other jobs I need to get done) and this brilliant article explains why that's helpful:

State of the Thesis

The thesis is currently 122 pages long with 29,206 words and 154,203 characters.

Tom Out!

Word 2010: Footnotes and Mendeley

Word 2010: Footnotes and Mendeley

In which I discuss getting footnotes and Mendeley references to look nice in Word...

I may not have mentioned it before on this blog but I am a Mendeley advisor and a strong advocate of this free reference manager. In fact I cover the pros and cons of it in this video:

Proper Gradients for MetaPost Pulse Sequences

Proper Gradients for MetaPost Pulse Sequences

In which I improve upon the previous post...

In yesterday's post I talked about using MetaPost to generate Pulse Sequence Diagrams for MRI documents. I have been using this to make nice diagrams for my Thesis. There is one problem, however, with the pulse sequence file provided on Mark's website - it generates square gradients.

Pulse Sequence Diagrams Using Metapost

Pulse Sequence Diagrams Using Metapost

In which I use MetaPost to generate publication quality pulse sequence diagrams...

Pulse sequences are the series of radio-frequency pulses required to generate an MR image. If you are an MR Physicist you will see these a lot and probably wondered how can I generate nice pulse sequences for my thesis, papers etc. Well handily using MetaPost and these files you can!

Osmanthus Green: Thesis, YouTube, Update!

Osmanthus Green: Thesis, YouTube, Update!

In which I review some floral green tea and update you on my life...

Thesis Writing

So thesis writing is fully under-way  now and my supervisors assure me that writing will get harder and longer as it continues - fun, fun, fun!

It takes me a while to get into writing but I expect I'll make a video about Thesis writing soon. I actually quite enjoy writing though so I hope I'll be able to keep the pace up and stay on schedule :)

Warming Camomile & PhD 3rd Year Retrospective

In which I talk about my approaching final year and try a warming tea...

So in a few days I should be officially into my fourth and final year of my PhD.  That means I'm hopefully one year away from wearing these crazy robes...

MRI Scanner Cake 2013

MRI Scanner Cake 2013

In which I bake another, more ambitious, MRI scanner cake...

The ISBE annual BBQ was on Friday so I had to once again attempt to bake an MRI scanner cake. I decided to go for a more realistic one than previously.

The basic cake is made using Delia's All-in-one Sponge recipe and then things get a little crazy as I make 4 of them.

MRI Basics: What Do I Need?

MRI Basics: What Do I Need?

In which I describe the components of an MRI scanner...

So following on from last week – other than a lot of money to pay for it all*, what do you need for an operational MRI scanner?

*Scanners are often upward of several million pounds.

A Large Magnet

In order to make a significant number of the spins in your body align in one direction a very powerful magnet is needed. The strength of these magnets is measured by a large unit called the Tesla (symbol: T). To get an appreciation of how strong that is there is another unit called the gauss which is also used to measure magnetic fields. 1 Tesla = 10,000 gauss and a normal bar magnet is around 100 gauss.

MRI Basics: What is MRI?

In which I explain the very basics of MRI...

Nuclear Magnetic Resonance (NMR) allows us to detect a signal due to a fundamental quantum property of atoms - spin (which I will explain in an upcoming post). Magnetic Resonance Imaging (MRI) uses these same principles to obtain images of (usually) hydrogen atoms in a substance/tissue.

(N)MRI is a non-invasive, non-ionising, imaging modality and is widely used in hospitals worldwide. What does all that mean?

Starting 3rd Year/So You Want To Do A PhD?

So I thought as my third year looms it might be worth reviewing my PhD experience and giving new or potential PhD students my thoughts.

2 Years In

So how do I feel now that I'm successfully onto the 3rd year of my programme?

In general, I am enjoying my PhD and I am very grateful for the opportunity I have been given. There are of course downsides but the majority are minor or would be the case in any job (such as delays beyond your control etc.). I am really looking forward to my upcoming industrial placement as it will be a nice change of pace and will (fingers crossed) lead to a publication.

As far as progress goes I could be a little further ahead but with the potential for publications this year and my first oral presentation at BC-ISMRM next week I'm very excited for my third year. There's always a bit of worry from being half-way through something but I'm coping well at the moment.

So You Want To Do A PhD?

There are already books[1] on getting a PhD but I think I'll summarise the general points below.

Why should you do one?

  • You want to get into academia/research - it's still the standard route.
  • You're really interested in a specific research area - if you enjoy it, do it!
  • You need a higher level qualification for your ideal job - though you still need to be interested!

Why shouldn't you do one?

  • Just for the title
  • Because you're afraid of getting a real job
  • You want to stay a student forever

So if you've decided you want to do a PhD there's still a lot of choice for doctoral courses, which one should you pick?

PhD Types

  • Traditional PhD/DPhil - Normally 3 years funded* (in the UK) and takes around 3.5 years, the traditional model with topic usually being set at the beginning by your supervisors. Funding from the research councils is currently £13,590 (tax free).†
  • EngD etc. - 4 years including taught elements and industrial placements.
  • DTC based PhD - usually 4 years with taught elements. Often you don't pick a research topic straight away choosing it between 3-12 months in.
  • Industrial CASE PhD - usually 4 years funded with a 3-6 month industrial placement. These include an increase to the normal PhD stipend of up to ~£7,000

I'm on an Industrial CASE PhD so there's the possibility I'm slightly wrong about the differences between the others.

Once you've decided your research field/topic, the type of PhD you want to do and double checked that your really want to do one - start applying!

Most PhD positions are advertised from January onwards with interviews around February. If there is funding though PhD positions need to be filled and there will be positions advertised all year. Summer tends to have a large number of PhD places which weren't filled early in the year on offer.§

So You're In For The Long Haul?

What can you expect from your time doing a PhD then?

1st Year

Regardless of your programme you are going to have to review the literature. This normally takes around 3 months and is sometimes publishable as a paper if your field is in an interesting niche.

You will learn how to use the lab equipment/computers/databases/blackboards you need for your continued research.

You will probably narrow down the topic area and methods to be used in future years.

You may get trained on something really specific (I was flown out to Bruker in Germany to learn how to program MRI scanners).

You will have some sort of report to get through to the next year. I had to have a full-on viva but other departments have a simple meeting with supervisors to see if you should continue.

2nd Year

This is usually your method development year. For CASE students you may go on your first placement.

If method development is quick you can start collecting useful data.

3rd Year

This is your data collection year. People on a '3 year' programme will need all their data pretty much by the end of this year.

4th Year

On a 3 year programme you will be writing the thesis until your agree viva date. On a 4 year programme you will finish data collection then write the thesis.


Graduate! :D

* This is for Sciences PhDs - it is a lot harder to get funding in the Humanities.

†Funding bodies will also pay your tuition fees.‡

‡I believe Wellcome Trust provide the best at the moment with total stipend of around £21,000

§You can see available positions on respective universities' websites and at

You will write a fair amount of certain thesis sections ahead of this time. Some people write up throughout and continue collecting data well into the traditional data collection phase.

Tom out!

[1] Phillips, E.M. and Pugh, D.S., 2000. How to Get a PhD: A Handbook for Students and Their Supervisors. 3rd ed. Maidenhead: Open University Press.