The following contains scripts that I used with my dissertation (Keele University, 2024-25) entitled "Reprocessing of aeromagnetic and gravity data of the Mull Central Complex, Western Scotland". I also look to add the final dissertation and LaTeX files which go with this once it has been completed.
Check out a short talk I gave at Keele University (January 2025; available here) on the Geomagnetic field, where I briefly discuss the processed data used here, providing a wider context.
This project was completed with the help and support of my supervisor, Dr. Ian Stimpson. Thank you, also, to the contributors of the harmonica and pyGIMLi packages (Prof. Leonardo Uieda and Prof. Thomas Günther) for their help in answering questions I posed during the project. Tutorials on the package websites were also of great help in forming the bases of much of the code written.
Work here is licenced using the LICENCE file. However, please note that this work contains British Geological Survey data (for the aeromagnetic and gravity data) and Ordenance Survey data (for the map background of anomaly images). Licences and links to the sources are below:
- Contains British Geological Survey materials © UKRI [2025], licensed under the Open Government Licence v3.0. The Great Britain aeromagnetic survey is available from here, and Great Britain land gravity survey available from here.
- Contains OS data © Crown copyright and database right (2024), lienced under the Open Government Licence v3.0. The 1:250 000 Scale Colour Raster is used, available from here.
There are two folders, where Report contains the dissertation (LaTeX documents and PDF) and Code contains the Jupyter Notebooks, Python scripts and output files generated. Note, this is a working document, so changes will likely be made and the file structure may not be intuitive.
The project consists of processing aeromagnetic and gravity data (in the Aeromagnetic and Gravity folders). Then models were generated in the Modelling/Gravity folder, before the half width of anomalies modelled and generated from processed data were calculated in Calc_FWHM.ipynb (whilst Compare_Models_Data.ipynb generates graphs to compare models and Compare_to_original.ipynb does this but for data from Bott & Tantrigoda 1987).
Also, note that AeromagCrossValScore.py and GravityCrossValScore.py were run separately in a screen on a remote server, since this was quite computationally intensive. Modelling.py also contains a computationally intensive line when itterating through models (at the end), taking around 40 minutes to run.
Those files which are provided by the BGS and the Ordenance Survey have been redacted but are freely available online (by following the links provided above).
Finally, I have not been able to resolve a significant discrepency in the generated size of anomalies via modelling compared to those observed, hence why graphs contain two scales when showing modelled and observed anomalies.
Throughout this work, the following have been extensively used:
Bott, M. H. P., & Tantrigoda, D. A. 1987. Interpretation of the gravity and magnetic anomalies over the Mull Tertiary intrusive complex, NW Scotland. Journal of the Geological Society, 144(1), 17–28.
Fatiando a Terra Project, Castro, Y. M., Esteban, F. D., Li, L., Oliveira J., Vanderlei C, Pesce, A., Shea, N., Soler, S. R., Souza-Junior, G. F., Tankersley, M., Uieda, L., & Uppal, I. 2024. Harmonica v0.7.0: Forward modeling, inversion, and processing gravity and magnetic data.
Rücker, C., Günther, T., & Wagner, F. M. 2017. pyGIMLi: An open-source library for modelling and inversion in geophysics. Computers and Geosciences, 109, 106–123.
Smalley, B. 2024. PHY-30027: Data Analysis and Model Testing. Lecture Notes (Keele University, UK).
Uieda, L. 2018. Verde: Processing and gridding spatial data using Green’s functions. Journal of Open Source Software, 3(30), 957.
I recommend creating two separate Conda environments with which to run code (one for modelling and one for processing gravity and aeromagnetic data), containing the following packages:
numpy2.0.2xarray2024.9.0matplotlib3.9.2pandas2.2.3pygmt0.13.0convertbng0.7.4 (pip)xrft1.0.1magnetic_field_calculator1.0.2 (pip)harmonica0.7.0verde1.8.1jupyter1.1.1pandas2.2.3
matplotlib3.10.0numpy1.26.4pygimli1.5.3shapely2.0.6mpl_axes_aligner(download locally from the repository)jupyterlab4.3.4