Skip to main content

DOI License: MIT Documentation Status

MMT Numerical Libraries: Multipole Inversion


Library for the numerical inversion of a scan grid detecting the magnetic signal from magnetic sources using a multipole expansion of the magnetic potential of the sources. The mathematical background of this method and its application to experimental data of a synthetic sample is developed in

D. Cortés-Ortuño, K. Fabian, L. V. de Groot Single Particle Multipole Expansions From Micromagnetic Tomography Geochemistry, Geophysics, Geosystems 22(4), e2021GC009663 (2021) DOI: https://doi.org/10.1029/2021GC009663

This library is developed as part of the Mimatom / MMT project.

Library

This library has two main modules

  • multipole_inversion/magnetic_sample.py : contains the MagneticSample class to create a magnetic system with magnetic point sources (dipole or higher order multipole sources) and generate the scan signal. This class also has methods to save the scan signal data in npz format and the scan grid specifications in json format.

  • multipole_inversion/multipole_inversion.py : contains the MultipoleInversion class to perform a numerical inversion from a scan signal data. This class requires scan surface specifications, particle (point source) locations and the scan signal data. These can be passed from the MagneticSample output or be specified manually (useful for combining with other workflows such as micromagnetic simulations).

An additional module to plot results from the inversions is provided in multipole_inversion/plot_tools.py. Magnetic susceptibility and magnetic field functions can be found in the main library as well, although not all of them are documented in the tutorial yet.

Installation

Via PyPI or from this repository using pip . or poetry install or poetry build (which can be used with pip). Poetry is recommended for development.

CUDA

This library contains an optional Nvidia CUDA library to populate the forward matrix in the multipole_inversion code. To build this library you need to set the CUDAHOME or CUDA_PATH environment variables to the location of CUDA in your system. Alternatively, the nvcc compiler path can be set in the PATH variable. The it is only necessary to install or build the library using poetry install or poetry build.

Tutorial

For now you can visualize the Jupyter notebooks from the jupytext scripts in the doc/tutorial/ folder. These notebooks can also be generated from their associated jupytext script, for example,

jupytext --to notebook multipoles_inversion_test.py 

The documentation of the classes can be generated using sphinx and the scripts to do this are located in the doc folder. Future releases of this library will include an online documentation of this code.

Cite

If you find this library useful please cite us (you might need LaTeX's url package)

@Misc{Cortes2022,
  author       = {Cortés-Ortuño, David and Fabian, Karl and de Groot, Lennart V.},
  title        = {{MMT Numerical Libraries: Multipole Inversion}},
  publisher    = {Zenodo},
  note         = {Github: \url{https://github.com/Micromagnetic-Tomography/multipole_inversion}},
  year         = {2022},
  doi          = {10.5281/zenodo.6473257},
  url          = {https://doi.org/10.5281/zenodo.6473257},
}

If you have a new version of biblatex you can also use @Software instead of @Misc, and add a version={} entry. You can also cite the paper with the theoretical framework of this library:

@article{Cortes2021,
author = {Cortés-Ortuño, David and Fabian, Karl and de Groot, Lennart V.},
title = {Single Particle Multipole Expansions From Micromagnetic Tomography},
journal = {Geochemistry, Geophysics, Geosystems},
volume = {22},
number = {4},
pages = {e2021GC009663},
keywords = {magnetism, micromagnetic tomography, multipole, paleomagnetism, rock magnetism},
doi = {https://doi.org/10.1029/2021GC009663},
url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2021GC009663},
eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2021GC009663},
note = {e2021GC009663 2021GC009663},
year = {2021}
}

Release files for mmt-multipole-inversion 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mmt-multipole-inversion 1.0
File Size Uploaded
mmt_multipole_inversion-1.0.tar.gz 28.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for mmt-multipole-inversion 1.0
File
mmt_multipole_inversion-1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
mmt_multipole_inversion-1.0-cp310-cp310-manylinux_2_31_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.31+ x86-64 Details
mmt_multipole_inversion-1.0-cp310-cp310-macosx_10_16_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.16+ x86-64 Details
mmt_multipole_inversion-1.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
mmt_multipole_inversion-1.0-cp39-cp39-manylinux_2_31_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.31+ x86-64 Details
mmt_multipole_inversion-1.0-cp39-cp39-macosx_10_16_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.16+ x86-64 Details
mmt_multipole_inversion-1.0-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
mmt_multipole_inversion-1.0-cp38-cp38-manylinux_2_31_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.31+ x86-64 Details
mmt_multipole_inversion-1.0-cp38-cp38-macosx_10_16_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.16+ x86-64 Details

Total release size: 329.4 kB

Release files / mmt_multipole_inversion-1.0.tar.gz

Download URL mmt_multipole_inversion-1.0.tar.gz
Size 28.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3419b76422ed019d888723f022a3e22679825eb744bce99784d390f5ef71ad02
BLAKE2b-256 checksum
How to use checksums
2b5eb0d6cb19bcc86a7cb02edac13abd040616d57782e1eb5ca0ac64591a4dcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / mmt_multipole_inversion-1.0-cp310-cp310-win_amd64.whl

Download URL mmt_multipole_inversion-1.0-cp310-cp310-win_amd64.whl
Size 33.5 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
c5b53a66af64b5c10116aaa612c1cdaf61cc84ef6f066d4c201119837a23f388
BLAKE2b-256 checksum
How to use checksums
bb662e546ecef0f5be9f2a918affe28b3753664f50876163667b9b58b52f863a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / mmt_multipole_inversion-1.0-cp310-cp310-manylinux_2_31_x86_64.whl

Download URL mmt_multipole_inversion-1.0-cp310-cp310-manylinux_2_31_x86_64.whl
Size 33.3 kB
Tags CPython 3.10 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
e36788844701ee7d580515714925e282d3687323d29978379ff868d147da3bbc
BLAKE2b-256 checksum
How to use checksums
903dca2c55625186c71b4eedd0a5acd0537cb303ee3be55025abce98461705ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / mmt_multipole_inversion-1.0-cp310-cp310-macosx_10_16_x86_64.whl

Download URL mmt_multipole_inversion-1.0-cp310-cp310-macosx_10_16_x86_64.whl
Size 33.3 kB
Tags CPython 3.10 macOS 10.16+ x86-64
SHA-256 checksum
How to use checksums
e61fd2029c77fd00117e7f96d70a575e8616ffebda6fa08b70cd5c2826a36049
BLAKE2b-256 checksum
How to use checksums
2b2c7429f638dc77e7d793ace5d47e5864785a27a343bba1117713ea09e10ad8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / mmt_multipole_inversion-1.0-cp39-cp39-win_amd64.whl

Download URL mmt_multipole_inversion-1.0-cp39-cp39-win_amd64.whl
Size 33.5 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
12bd74f0bd47ad2cf6167e9f932cc4d79c497143442ef5c69df9fd3162c6ad76
BLAKE2b-256 checksum
How to use checksums
7b37ceb3028bdf22313398e7dc26524d26479efa5810ace94ee86848b195eff7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / mmt_multipole_inversion-1.0-cp39-cp39-manylinux_2_31_x86_64.whl

Download URL mmt_multipole_inversion-1.0-cp39-cp39-manylinux_2_31_x86_64.whl
Size 33.3 kB
Tags CPython 3.9 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
14ada1d5c32663d36f415bd5d12fdf46ed191f5da5fe02cec1f600a96be12262
BLAKE2b-256 checksum
How to use checksums
d2817bab375a8008d8c3bb6c16cb6679f98c60fa5d5951e6c016331c52752307
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / mmt_multipole_inversion-1.0-cp39-cp39-macosx_10_16_x86_64.whl

Download URL mmt_multipole_inversion-1.0-cp39-cp39-macosx_10_16_x86_64.whl
Size 33.3 kB
Tags CPython 3.9 macOS 10.16+ x86-64
SHA-256 checksum
How to use checksums
db7de40c474b93623a38114f4e68bd42f8e700193e18eee86acd293de2c3251a
BLAKE2b-256 checksum
How to use checksums
1227a8acca72ce5933d58942a281ebec515cd5270b0bd1cb7bc13d0d4dd7b45a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / mmt_multipole_inversion-1.0-cp38-cp38-win_amd64.whl

Download URL mmt_multipole_inversion-1.0-cp38-cp38-win_amd64.whl
Size 33.5 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
bfe8d412edfa73a3d35abd2af1ef29369ac47d85c4485c0e4477559fc6b1847e
BLAKE2b-256 checksum
How to use checksums
843db1e43e829bade4dfb24ef04ad926842d57413a37d52c684075e8556176fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / mmt_multipole_inversion-1.0-cp38-cp38-manylinux_2_31_x86_64.whl

Download URL mmt_multipole_inversion-1.0-cp38-cp38-manylinux_2_31_x86_64.whl
Size 33.3 kB
Tags CPython 3.8 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
f7b35d8d490160dbc1f15f843be7bccc5999b58786e2a9a7a884a1df4290b29a
BLAKE2b-256 checksum
How to use checksums
f567499ddba11807da00e8203a3dae85e5bbd27194a2b13f7bb466e2e397ea90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / mmt_multipole_inversion-1.0-cp38-cp38-macosx_10_16_x86_64.whl

Download URL mmt_multipole_inversion-1.0-cp38-cp38-macosx_10_16_x86_64.whl
Size 33.3 kB
Tags CPython 3.8 macOS 10.16+ x86-64
SHA-256 checksum
How to use checksums
526d0c2c1f45ace900cf3084817e91be0bb6f6666786347c7795c64a5a6249c2
BLAKE2b-256 checksum
How to use checksums
c1f47ee26e3dfdccad4a013bc3f8b7bb6f430062398544b4f889841643e38c55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

1.0 This release

10 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page