pyMag2Dpoly is a Python package conceived for forward magnetic anomaly calculation due to two-dimensional polygonal bodies with uniform arbitrary polarization. Docs: https://inverseproblem.github.io/pyMag2Dpoly
The formulations implemented in this package are that of Talwani & Heirtzler (1962, 1964), Won & Bevis (1987) and revised Kravchinsky et al. (2019). The specific procedures for each formulation, the analytical/numerical results derived from their comparison and the rectification made to Kravchinsky et al. (2019) algorithm are describde in detail in the paper below.
If you use this code for research or else, please cite the related paper:
Alessandro Ghirotto, Andrea Zunino, Egidio Armadillo & Klaus Mosegaard (2021). Magnetic Anomalies Caused by 2D Polygonal Structures with Uniform Arbitrary Polarization: new insights from analytical/numerical comparison among available algorithm formulations. Geophysical Research Letters, 48(7), e2020GL091732.