Initially, the magnetic field inside an NMR spectrometer or MRI scanner will be far from homogeneous compared with an "ideal" field of the device. This is a result of production tolerances and of the magnetic field of the environment. Iron constructions in walls and floor of the examination room become magnetized and disturb the field of the scanner. The probe and the sample or the patient become slightly magnetized when brought into the strong magnetic field and create additional inhomogeneous fields. The process of correcting for these inhomogeneities is called shimming the magnet, shimming the probe or shimming the sample, depending on the assumed source of the remaining inhomogeneity.