Nanoscale characterization of magnetic nanoparticles