BF - fix bug in magnitude calculation, closes #11

Magnitude method was not using instance variables. The test for
this method has now been added to make sure it continues to
function.
Merge pull request #13 from ajdawson/fix-magnitude

BF - fix bug in magnitude calculation, closes #11