Magnetic data is one of the most common geophysics datasets available on the surface of the Earth. Curie depth is the depth at which rocks lose their magnetism. The most prevalent magnetic mineral is magnetite, which has a Curie point of 580C, thus the Curie depth is often interpreted as the 580C isotherm.
Current methods to derive Curie depth first compute the (fast) Fourier transform over a square window of a magnetic anomaly that has been reduced to the pole. The depth and thickness of magnetic sources is estimated from the slope of the radial power spectrum. pycurious
implements the Tanaka et al. (1999) and Bouligand et al. (2009) methods for computing the thickness of a buried magnetic source, which are covered within Jupyter notebooks.
Launch the demonstration at mybinder.org
There are two matching sets of pycurious
notebooks - one set for the Tanaka and one for Bouligand implementations. The Bouligand set of noteboks are a natural choice for Bayesian inference applications.
Note, these examples can be installed from the package itself by running:
import pycurious
pycurious.install_documentation(path="Notebooks")
PyCurious consists of 2 classes:
CurieGrid
: base class that computes radial power spectrum, centroids for processing, decomposition of subgrids.CurieOptimise
: optimisation module for fitting the synthetic power spectrum (inherits CurieGrid).Also included is a mapping
module for gridding scattered data points, and converting between coordinate reference systems (CRS).
Below is a simple workflow to calculate the radial power spectrum:
import pycurious
# initialise CurieOptimise object with 2D magnetic anomaly
grid = pycurious.CurieOptimise(mag_anomaly, xmin, xmax, ymin, ymax)
# extract a square window of the magnetic anomaly
subgrid = grid.subgrid(window_size, x, y)
# compute the radial power spectrum
k, Phi, sigma_Phi = grid.radial_spectrum(subgrid)
To install with setuptools:
python setup.py install --user
This will compile all C source code and install them to the user directory (omit the --user
flag to install to the system directory). Remember to delete the build folder if you are upgrading this package.
Alternatively, install using pip:
pip install pycurious --user
Optional dependencies for mapping module:
A more straightforward installation for pycurious
and all of its dependencies may be deployed with Docker. To install the docker image and test it is working:
docker pull brmather/pycurious:latest
docker run --rm brmather/pycurious:latest help