magnetic layer resistance