Quench position reconstruction through harmonic field analysis in superconducting magnets