Tidy up HMM into a canonical form (log10 and sorted states).