Magnet sorting algorithms for insertion devices for the Advanced Light Source | IEEE Journals & Magazine | IEEE Xplore