An apparatus for accurate measurement of the temperature dependence of permanent magnetization