Elimination of thermoelectric artifacts in the harmonic Hall measurement of spin-orbit torque