Added magnitude difference calculator and sweet spot example