Create magnitude.py

Simply outputs magnitude