Origin of thermoremanent magnetization