We develop a new inversion code based on Zeeman effect to obtain solar magnetic maps. We deeply analyze the dependence of the results on the signal-to-noise ratio. We compare our code with the HAO MERLIN code (USA). Using our numerical code, we interpret Fe i line observed at IRSOL in Locarno.