a method for correcting and / or calibrating magnetic fields , particularly intended for magnets in nuclear magnetic resonance imaging equipment , involves the mathematical description of the field generated by a magnet structure with a harmonic polynomial expansion and the determination of the number , position and magnetization distribution parameters on a predefined distribution grid , related to the magnetic structure , by comparing the polynomial expansion coefficients obtained from a sampling measurement of the actual field with the coefficients of the field having the desired characteristics . the coefficients of the polynomial which can represent the magnetic field are analyzed and subdivided according to the symmetry of the magnetic structure , the systematic coefficients being discriminated from the asystematic ones , depending on their presence , imposed by the symmetries of the magnetic structure , and the groups of coefficients so formed being separately minimized in separate sequences of steps for determining their characteristics as regards number and magnetization distribution and as regards the position of the correction elements .