Skip to main content

Python tool for computing the Curie depth from magnetic data

Project description

PyCurious

Docker Cloud Automated build PyPI DOI Build Status

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 580°C, thus the Curie depth is often interpreted as the 580°C 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.

Binder

Launch the demonstration at mybinder.org

badge

Navigation / Notebooks

There are two matching sets of Jupyter 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")

Tanaka

Bouligand

Installation

Dependencies

You will need Python 2.7 or 3.5+. Also, the following packages are required:

Optional dependencies for mapping module and running the Notebooks:

Installing using pip

You can install pycurious using the pip package manager with either version of Python:

python2 -m pip install pycurious
python3 -m pip install pycurious

All the dependencies will be automatically installed by pip.

Installing using Docker

A more straightforward installation for pycurious and all of its dependencies may be deployed with Docker. To install the docker image and start the Jupyter notebook examples:

docker pull brmather/pycurious:latest
docker run --name pycurious -p 8888:8888 brmather/pycurious:latest

Usage

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)

A series of tests are located in the tests subdirectory. In order to perform these tests, clone the repository and run pytest:

git checkout https://github.com/brmather/pycurious.git
cd pycurious
pytest -v

API Documentation

The API for all functions and classes in pycurious can be accessed from https://brmather.github.io/pycurious/.

References

  1. Bouligand, C., Glen, J. M. G., & Blakely, R. J. (2009). Mapping Curie temperature depth in the western United States with a fractal model for crustal magnetization. Journal of Geophysical Research, 114(B11104), 1–25. https://doi.org/10.1029/2009JB006494
  2. Tanaka, A., Okubo, Y., & Matsubayashi, O. (1999). Curie point depth based on spectrum analysis of the magnetic anomaly data in East and Southeast Asia. Tectonophysics, 306(3–4), 461–470. https://doi.org/10.1016/S0040-1951(99)00072-4

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycurious-0.3.1.tar.gz (1.3 MB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page