Magnetic X-ray diffraction from ferromagnetic materials