Electron-orbit control using a postdiode magnetic-field structure