Sort by magnitude