Multipole shaking field for magnetic shielding