Dear Anton, Thank you for your reply. I’m probably more interested in 3D and will scan magnetic fields. Could you please help clarify whether the following understandings are correct? 1. Both the PRR method and the built-in kwant.kpm.correlator can calculate the Chern marker. The former is more efficient in 3D. 2. Although the code in my first post for a 2D QHE is probably not yet enough tuned, conceptually it is correct: define x,y as kwant density operators and then feed to kwant.kpm.correlator. (I'm not sure since there is no example in the documentation other than the special case of kpm.conductivity.) 3. The main difference between the two methods lies in how they use kpm expansion. kwant.kpm.correlator uses the so-called two-dimensional kpm expansion. The PRR method uses the conventional kpm expansion to approximate the projection below Fermi energy. 4. Actually, I wonder what makes the PRR method special as I want to code it myself. Is it only 2.? Or anything else? Thank you very much!