Systematic error analysis of demagnetization and implications for magnetic interpretation