Programming

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.

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!

Installing QT Creator

In which I setup an IDE for my coding...

As with most of my Tinker posts to do with computers this is a guide to something I might need to do again in the future. You can probably find out how to do it online but I struggled with bits and am putting it here for my own and other's reference.

I am currently demonstrating a C++ lab at the University and it's good to be able to run the example code myself ahead of time. Also I am continuing to teach myself C++ as part of Project Euler.

Project Euler

In which I get back into coding in C...

I did a programming course* during my undergrad but it's fallen by the wayside recently. In an effort to improve my coding skills, and my understanding of maths, I have started on Project Euler.

*I took two actually but only had time for the coursework in one - I might upload my program for it later.

Project Euler

Project Euler (http://projecteuler.net/) is a website which sets maths problems and asks you to solve them with programming. There are currently 410 problems for you to solve.

They usually give an example or two and then ask for a harder calculation. Par example, the 6th prime number is 13 - now find the 15,000th.

This has been very helpful for re-learning my coding skills. You have to break down the maths problem into steps and then work out how the hell you would code that. Also it's fun and challenging!