{ "info": { "author": "Ben Mather", "author_email": "brmather1@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "![PyCurious](https://github.com/brmather/pycurious/blob/master/pycurious/Examples/Images/pycurious-logo.png?raw=true)\n\n[![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/brmather/pycurious.svg)](https://hub.docker.com/r/brmather/pycurious)\n[![PyPI](https://img.shields.io/pypi/v/pycurious.svg)](https://pypi.org/project/pycurious/)\n[![DOI](https://zenodo.org/badge/123281222.svg)](https://zenodo.org/badge/latestdoi/123281222)\n[![Build Status](https://travis-ci.org/brmather/pycurious.svg?branch=master)](https://travis-ci.org/brmather/pycurious)\n\nMagnetic 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\u00b0C, thus the Curie depth is often interpreted as the 580\u00b0C isotherm.\n\nCurrent 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. `pycurious` ingests maps of the magnetic anomaly and distributes the computation of Curie depth across multiple CPUs. Common computational workflows and geospatial manipulation of magnetic data are covered in the Jupyter notebooks bundled with this package.\n\n#### Binder\n\nLaunch the demonstration at [mybinder.org](https://mybinder.org/v2/gh/brmather/pycurious/binder?filepath=Notebooks%2F0-StartHere.ipynb)\n\n[![badge](https://img.shields.io/badge/launch-pycurious-E66581.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXm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+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/brmather/pycurious/binder?filepath=Notebooks%2F0-StartHere.ipynb)\n\n## Navigation / Notebooks\n\nThere are two matching sets of Jupyter notebooks - one set for the [Tanaka](#Tanaka) and one for [Bouligand](#Bouligand) implementations. The Bouligand set of noteboks are a natural choice for Bayesian inference applications.\n\nNote, these examples can be installed from the package itself by running:\n\n```python\nimport pycurious\npycurious.install_documentation(path=\"Notebooks\")\n```\n\n### Tanaka\n\n- [Ex1-Plot-power-spectrum.ipynb](pycurious/Examples/Notebooks/Tanaka/Ex1-Plot-power-spectrum.ipynb)\n- [Ex2-Compute-Curie-depth.ipynb](pycurious/Examples/Notebooks/Tanaka/Ex2-Compute-Curie-depth.ipynb)\n- [Ex3-Parameter-exploration.ipynb](pycurious/Examples/Notebooks/Tanaka/Ex3-Parameter-exploration.ipynb)\n\n### Bouligand\n\n- [Ex1-Plot-power-spectrum.ipynb](pycurious/Examples/Notebooks/Bouligand/Ex1-Plot-power-spectrum.ipynb)\n- [Ex2-Compute-Curie-depth.ipynb](pycurious/Examples/Notebooks/Bouligand/Ex2-Compute-Curie-depth.ipynb)\n- [Ex3-Posing-the-inverse-problem.ipynb](pycurious/Examples/Notebooks/Bouligand/Ex3-Posing-the-inverse-problem.ipynb)\n- [Ex4-Spatial-variation-of-Curie-depth.ipynb](pycurious/Examples/Notebooks/Bouligand/Ex4-Spatial-variation-of-Curie-depth.ipynb)\n- [Ex5-Mapping-Curie-depth-EMAG2.ipynb](pycurious/Examples/Notebooks/Bouligand/Ex5-Mapping-Curie-depth-EMAG2.ipynb)\n\n\n## Installation\n\n### Dependencies\n\nYou will need **Python 2.7 or 3.5+**.\nAlso, the following packages are required:\n\n- [`numpy`](http://numpy.org)\n- [`scipy`](https://scipy.org)\n- [`cython`](https://cython.org/)\n\n__Optional dependencies__ for mapping module and running the Notebooks:\n\n- [`jupyter`](https://jupyter.org/)\n- [`matplotlib`](https://matplotlib.org/)\n- [`pyproj`](https://github.com/jswhit/pyproj)\n- [`cartopy`](https://scitools.org.uk/cartopy/docs/latest/)\n\n### Installing using pip\n\nYou can install `pycurious` using the\n[`pip package manager`](https://pypi.org/project/pip/) with either version of Python:\n\n```bash\npython2 -m pip install pycurious\npython3 -m pip install pycurious\n```\nAll the dependencies will be automatically installed by `pip`.\n\n### Installing with conda\n\nYou can install `pycurious` using the [conda package manager](https://conda.io).\nIts required dependencies can be easily installed with:\n\n```bash\nconda install numpy scipy cython\n```\n\nAnd the full set of dependencies with:\n\n```bash\nconda install numpy scipy cython matplotlib pyproj cartopy\n```\n\nThen `pycurious` can be installed with `pip`:\n\n```bash\npip install pycurious\n```\n\n#### Conda environment\n\nAlternatively, you can create a custom\n[conda environment](https://conda.io/docs/user-guide/tasks/manage-environments.html)\nwhere `pycurious` can be installed along with its dependencies.\n\nClone the repository:\n```bash\ngit clone https://github.com/brmather/pycurious\ncd pycurious\n```\n\nCreate the environment from the `environment.yml` file:\n```bash\nconda env create -f environment.yml\n```\n\nActivate the newly created environment:\n```bash\nconda activate pycurious\n```\n\nAnd install `pycurious` with `pip`:\n```bash\npip install pycurious\n```\n\n#### Issue with gcc\n\nIf the `pycurious` installation fails due to [an issue with `gcc` and\nAnaconda](https://github.com/Anaconda-Platform/anaconda-project/issues/183), you just\nneed to install `gxx_linux-64` with conda:\n\n```bash\nconda install gxx_linux-64\n```\n\nAnd then install `pycurious` normally.\n\n\n### Installing using Docker\n\nA more straightforward installation for `pycurious` and all of its dependencies may be deployed with [Docker](https://www.docker.com).\nTo install the docker image and start the Jupyter notebook examples:\n\n```bash\ndocker pull brmather/pycurious:latest\ndocker run --name pycurious -p 8888:8888 brmather/pycurious:latest\n```\n\n## Usage\n\nPyCurious consists of 2 classes:\n\n- `CurieGrid`: base class that computes radial power spectrum, centroids for processing, decomposition of subgrids.\n- `CurieOptimise`: optimisation module for fitting the synthetic power spectrum (inherits CurieGrid).\n\nAlso included is a `mapping` module for gridding scattered data points, and converting between coordinate reference systems (CRS).\n\nBelow is a simple workflow to calculate the radial power spectrum:\n\n```python\nimport pycurious\n\n# initialise CurieOptimise object with 2D magnetic anomaly\ngrid = pycurious.CurieOptimise(mag_anomaly, xmin, xmax, ymin, ymax)\n\n# extract a square window of the magnetic anomaly\nsubgrid = grid.subgrid(window_size, x, y)\n\n# compute the radial power spectrum\nk, Phi, sigma_Phi = grid.radial_spectrum(subgrid)\n```\n\nA series of tests are located in the *tests* subdirectory.\nIn order to perform these tests, clone the repository and run [`pytest`](https://pypi.org/project/pytest/):\n\n```bash\ngit checkout https://github.com/brmather/pycurious.git\ncd pycurious\npytest -v\n```\n\n### API Documentation\n\nThe API for all functions and classes in `pycurious` can be accessed from [https://brmather.github.io/pycurious/](https://brmather.github.io/pycurious/).\n\n\n## References\n\n1. 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\u201325. https://doi.org/10.1029/2009JB006494\n2. 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\u20134), 461\u2013470. https://doi.org/10.1016/S0040-1951(99)00072-4", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/brmather/pycurious", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pycurious", "package_url": "https://pypi.org/project/pycurious/", "platform": "", "project_url": "https://pypi.org/project/pycurious/", "project_urls": { "Homepage": "https://github.com/brmather/pycurious" }, "release_url": "https://pypi.org/project/pycurious/1.0.2/", "requires_dist": null, "requires_python": ">=2.7, >=3.5", "summary": "Python tool for computing the Curie depth from magnetic data", "version": "1.0.2" }, "last_serial": 5576040, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "270b6fcdb5c0658f66da4de1ecc3a7fe", "sha256": "4b0d54ea0b33c495f9b5a37bf2c057a84de66cf2eeb0603ad5a38794a496d6b5" }, "downloads": -1, "filename": "pycurious-0.1.tar.gz", "has_sig": false, "md5_digest": "270b6fcdb5c0658f66da4de1ecc3a7fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1294791, "upload_time": "2018-08-29T16:11:55", "url": "https://files.pythonhosted.org/packages/be/5e/f7a8335444b2321854289d69d5272995f590c5a4e3057a1fbb0e01bea047/pycurious-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a1caac2a1a65f8970b50b2d8f2811bba", "sha256": "97bf465a00ac16b9dd86f69b6bbc59ff8d2cc45f3d2c763ed14ace709ac44087" }, "downloads": -1, "filename": "pycurious-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a1caac2a1a65f8970b50b2d8f2811bba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1294807, "upload_time": "2018-08-30T01:54:29", "url": "https://files.pythonhosted.org/packages/cc/da/697fdb7d43c838a95aae2513b6104a33c07ad91c8ae836c113220a6df456/pycurious-0.1.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "0200b2eea205e785ec143b0d114f6483", "sha256": "5e905fa74661b804eb2e47e7e829c7fe802a89e28af371f882f7b1ee54a95711" }, "downloads": -1, "filename": "pycurious-0.2.tar.gz", "has_sig": false, "md5_digest": "0200b2eea205e785ec143b0d114f6483", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1298493, "upload_time": "2019-01-10T03:57:25", "url": "https://files.pythonhosted.org/packages/40/c5/8c33caff3596fe8aa40ca2d83fea8c51af3f275b6b83b86dbafbf3a69e19/pycurious-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "1486f7818d00bfb7e6abae0200a9cce6", "sha256": "1a89faf28740e5d3017719e5b9008b5e318f0816fb23e531f7082d111550b66b" }, "downloads": -1, "filename": "pycurious-0.3.tar.gz", "has_sig": false, "md5_digest": "1486f7818d00bfb7e6abae0200a9cce6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, >=3.5", "size": 1302386, "upload_time": "2019-06-18T05:57:06", "url": "https://files.pythonhosted.org/packages/a5/f4/30024d7a63315c3e54b790f35285d277336f605f50bf6ba3f83ed6340861/pycurious-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "82b31f0368aa96103c4b3108564565db", "sha256": "dad6a75c99cc1b6c758116247f030c73c2566470c5e779640238a3c4f6d001ab" }, "downloads": -1, "filename": "pycurious-0.3.1.tar.gz", "has_sig": false, "md5_digest": "82b31f0368aa96103c4b3108564565db", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, >=3.5", "size": 1301447, "upload_time": "2019-06-20T00:58:53", "url": "https://files.pythonhosted.org/packages/e9/29/1d9eb21ed719371de4b9e89f5985c848a23cd7fd58b606e30fdc8f8a95bc/pycurious-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "d03e149fe42968cd607f889e6d7affde", "sha256": "81229dd8294508126c455616b5658fbb8acc81ab5b7ba023abc1b6002ad4e05d" }, "downloads": -1, "filename": "pycurious-0.3.2.tar.gz", "has_sig": false, "md5_digest": "d03e149fe42968cd607f889e6d7affde", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, >=3.5", "size": 1470441, "upload_time": "2019-06-20T08:03:48", "url": "https://files.pythonhosted.org/packages/3e/12/a28b1f6615c741db2f037a047defa307939f0d7007d3c64ef8a26a43132e/pycurious-0.3.2.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "10b3fb440d317178e2ab29097053f3c3", "sha256": "ed6298d768ef871cacee97cc15f9dcc039d96f339d2887b2ee39898c27759654" }, "downloads": -1, "filename": "pycurious-0.4.tar.gz", "has_sig": false, "md5_digest": "10b3fb440d317178e2ab29097053f3c3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, >=3.5", "size": 1437207, "upload_time": "2019-06-24T13:03:41", "url": "https://files.pythonhosted.org/packages/2a/f4/063241be23baf131ef7d6967d26d353fa9a00eb4fe0751db9b991df944e4/pycurious-0.4.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "d5bd6792a98a45d716a6e1f00ff49c04", "sha256": "faa5f6b8463cbecb1f7842f7168a360a72ab2afe8974276a0d4241f142c99675" }, "downloads": -1, "filename": "pycurious-1.0.tar.gz", "has_sig": false, "md5_digest": "d5bd6792a98a45d716a6e1f00ff49c04", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, >=3.5", "size": 1440734, "upload_time": "2019-07-24T04:01:39", "url": "https://files.pythonhosted.org/packages/e6/75/f240322576e805b602a734408dcadcc067cce4f9ec66517f3cef1cf924d0/pycurious-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "8882f29d1f2a46a4f47fd72bb7ca8f91", "sha256": "8fc5f3caae9617abc74c2932561248f21406a8e82a1f7f5a06aeaea14f963dc4" }, "downloads": -1, "filename": "pycurious-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8882f29d1f2a46a4f47fd72bb7ca8f91", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, >=3.5", "size": 1440740, "upload_time": "2019-07-24T04:52:54", "url": "https://files.pythonhosted.org/packages/69/63/843e96e1b1691ae75e6191500455ad699d1562d2284e32becb1391155197/pycurious-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "b050f29b11447e86ff02f547bd3bbd72", "sha256": "e8c4d86338a65f0922d29e064813d07efbcdfa7857255d3c7fe29ad5e71c81e7" }, "downloads": -1, "filename": "pycurious-1.0.2.tar.gz", "has_sig": false, "md5_digest": "b050f29b11447e86ff02f547bd3bbd72", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, >=3.5", "size": 1440742, "upload_time": "2019-07-24T06:15:56", "url": "https://files.pythonhosted.org/packages/4e/54/9555e6ade991fefa920016572cfb9a9d551681ef70a7d1ee6216d6d0cb3a/pycurious-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b050f29b11447e86ff02f547bd3bbd72", "sha256": "e8c4d86338a65f0922d29e064813d07efbcdfa7857255d3c7fe29ad5e71c81e7" }, "downloads": -1, "filename": "pycurious-1.0.2.tar.gz", "has_sig": false, "md5_digest": "b050f29b11447e86ff02f547bd3bbd72", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, >=3.5", "size": 1440742, "upload_time": "2019-07-24T06:15:56", "url": "https://files.pythonhosted.org/packages/4e/54/9555e6ade991fefa920016572cfb9a9d551681ef70a7d1ee6216d6d0cb3a/pycurious-1.0.2.tar.gz" } ] }