Quantitative study of magnetic field distribution by electron holography and micromagnetic simulations