Synthesis and magnetism of hematite and maghemite nanoparticles