Skip to main content

2D Multi-Modal Data Fusion for Electron Microscopy

License PyPI Python

Fused multi-modal electron microscopy, a combines elastic scattering (HAADF) and inelastic spectroscopic signals (EELS/EDX) to recover high signal-to-noise ratio chemical maps at nano- and atomic-resolution.

By linking simultaneously acquired modalities through regularized optimization, the method can reduce dose requirements by over one order of magnitude while substantially improving SNR for chemical maps.

Demo Screenshot

Installation

The package is available on PyPI:

pip install mapfusion

For local development, clone the repository and install in editable mode:

git clone https://github.com/jtschwar/Multi-Modal-2D-Data-Fusion.git --recursive
cd Multi-Modal-2D-Data-Fusion
pip install -e . 

Quick Start

from mapfusion import DataFusion

# Initialize fusion with list of elements
elements = ['Co', 'S', 'O']
fusion = DataFusion(elements)

# Load your chemical maps
# Provide as a dictionary where keys match your element list
# This helper function loads starter data from github
cobalt_map, sulfur_map, oxygen_map, haadf_im = fusion.load_edx_example()
chemical_maps = {
    'Co': cobalt_map,      # 2D numpy arrays
    'S': sulfur_map, 
    'O': oxygen_map
}
fusion.load_chemical_maps(chemical_maps)

# Load the simultaneously acquired HAADF image
fusion.load_haadf(haadf_im)  # 2D numpy array

# Run the fusion algorithm 
# We can adjust with regularization parameters
fusion.run(
    nIter=50, 
    lambdaEDS = 0.005, lambdaTV=0.1,
    plot_images=True, plot_convergence=True)

# Get results in dictionary format
results = fusion.get_results()
fused_cobalt = results['Co']
fused_sulfur = results['S']

Documentation

Refer to the comprehensive tutorial to learn how to adjust the hyperparameters.

Citation

If you use any of the data and source codes in your publications and/or presentations, we request that you cite our papers:

Metadata

Release files for mapfusion 0.9.1

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

Source distribution (sdist)

Source distribution for mapfusion 0.9.1
File Size Uploaded
mapfusion-0.9.1.tar.gz 1.6 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for mapfusion 0.9.1
File
mapfusion-0.9.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
mapfusion-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
mapfusion-0.9.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
mapfusion-0.9.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
mapfusion-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
mapfusion-0.9.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
mapfusion-0.9.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
mapfusion-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
mapfusion-0.9.1-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
mapfusion-0.9.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
mapfusion-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
mapfusion-0.9.1-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
mapfusion-0.9.1-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
mapfusion-0.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
mapfusion-0.9.1-cp38-cp38-macosx_11_0_arm64.whl CPython 3.8 CPython 3.8 macOS 11.0+ ARM64 Details

Total release size: 3.3 MB

Release files / mapfusion-0.9.1.tar.gz

Download URL mapfusion-0.9.1.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
5f8339cf7bd8b361cc43449385ac919bb641ba4e233e3dfff42dc7e449f6273d
BLAKE2b-256 checksum
How to use checksums
d04fd349141190d76aeee38c10a8ee02d016c46deb412522edeafd324b62f0c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp312-cp312-win_amd64.whl

Download URL mapfusion-0.9.1-cp312-cp312-win_amd64.whl
Size 92.4 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
7dbba2278ed1b62a53393fdf385c2e69b7befd16f88bd6bb763f439b63a509b4
BLAKE2b-256 checksum
How to use checksums
90edec2b2157c2c96c8aa92b10cb989925794e3dd3791b9e5293ecc86644f595
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mapfusion-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 147.3 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
573b7eac76a8bf88c22ca31ca5caf48647e8f58f17a68c3c2ab28e9f7cf48e86
BLAKE2b-256 checksum
How to use checksums
4079cc9614bfb7a5b7338f795184092da396129b54f9dd53ed31d5d744d5727c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL mapfusion-0.9.1-cp312-cp312-macosx_11_0_arm64.whl
Size 99.4 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
00bfe2b785aca50be6c2be62a63222096e29894dc2239601e9df1858d707a839
BLAKE2b-256 checksum
How to use checksums
90cd64f4dd8ea74f2e061a02b4123952e8465da82465d676002b09983b9d87df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp311-cp311-win_amd64.whl

Download URL mapfusion-0.9.1-cp311-cp311-win_amd64.whl
Size 91.1 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
1e689d9c716fc833d4f01a19ff805ba4cd6e36b3560d130ad69b68ccd4ca1ad5
BLAKE2b-256 checksum
How to use checksums
2651a9825fe009354018d99e8bf933cb4bc9124dc3f7ada1ad644f0224d1c393
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mapfusion-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 146.4 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e4c7930ffa751c0c990f7793145accf3f01be05138c1c8374d72a68ba3ec81f0
BLAKE2b-256 checksum
How to use checksums
a718bae8ad4f98aaeb485b998e6725c56457ded7e582b09e17a49260cecec658
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL mapfusion-0.9.1-cp311-cp311-macosx_11_0_arm64.whl
Size 98.5 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2b8a5ede51938ccb80b3357a49583d45780e847039fa3fb407ebba9cc2e7f23c
BLAKE2b-256 checksum
How to use checksums
4e1eaed8038be260bb758fa598561b6b3d9dbaa1de884d0d3d4054f6e283b4b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp310-cp310-win_amd64.whl

Download URL mapfusion-0.9.1-cp310-cp310-win_amd64.whl
Size 90.5 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
f015fd74fb25fbf83a5b60f339c287eaf8e77112bc3e33390e63f25168d752df
BLAKE2b-256 checksum
How to use checksums
ec0bba75e33fb6af8f64627d742af9ea6fd37bb0ba37b70715f1e772cc3fa61a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mapfusion-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 145.1 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
332d4cd53c3429d793935568d47a2de4b26e9538de5511af6f9ba49d179b634b
BLAKE2b-256 checksum
How to use checksums
5d636386518ed5b9b7d0e27e41c6d2c78e2a3cf8e8c59bc6c24eb8f9b1f5acd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp310-cp310-macosx_11_0_arm64.whl

Download URL mapfusion-0.9.1-cp310-cp310-macosx_11_0_arm64.whl
Size 97.2 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f0ecc26d8d5cf15d9f979652b3e82839adad31c5e150e0ca0658b75dcf863236
BLAKE2b-256 checksum
How to use checksums
cc1e8dfdd5a5c6c0ffea2b835330852fc8d6db88ede3feb39196443654b2195c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp39-cp39-win_amd64.whl

Download URL mapfusion-0.9.1-cp39-cp39-win_amd64.whl
Size 91.4 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
72d1b4a573e53ebb7a6713336377f597b78b7d81137a8a8811e797d166d66375
BLAKE2b-256 checksum
How to use checksums
6873bafce1c784e2617a218f6a6591bb225d0268083c43766ae05642bbcec7cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mapfusion-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 145.6 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b32b8618c4610d600d1e624a2d50f5eea3dea9c4f8567b9c4f83d894f35df41d
BLAKE2b-256 checksum
How to use checksums
6d5d3c9e7d86be4890c561289fc3c058d74cdb5edde10e0f4cf63a042db35a36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp39-cp39-macosx_11_0_arm64.whl

Download URL mapfusion-0.9.1-cp39-cp39-macosx_11_0_arm64.whl
Size 97.3 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9ed5f02c1355ea1239d7ad8a6c1576ef26df0d1852fd3bf3d60152d653d7972b
BLAKE2b-256 checksum
How to use checksums
6887e65aa2f676d52df8ce5c543bfa1223d7904e8694be1c685e7e904368bdab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp38-cp38-win_amd64.whl

Download URL mapfusion-0.9.1-cp38-cp38-win_amd64.whl
Size 90.2 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
1e997985425ba38e195adae179c483a53a789752b98464ec2f142858913eea85
BLAKE2b-256 checksum
How to use checksums
efb0b437ea6aa763b5d84b3a79f9b44a3d9ce6d262d4af02ec14b98122b683e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mapfusion-0.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 144.8 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6fccfa99a38c92315fca32ed268b774110a2b415714d60feb7ce4d2e622724c1
BLAKE2b-256 checksum
How to use checksums
96f8a6b8a283739b003115ec438f0463133d1524ad857565fba17a78996d8779
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mapfusion-0.9.1-cp38-cp38-macosx_11_0_arm64.whl

Download URL mapfusion-0.9.1-cp38-cp38-macosx_11_0_arm64.whl
Size 96.9 kB
Tags CPython 3.8 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3626a06be78dc2d9f241bf67f27bd5902aed2dd73323ae5225c0aac8fc883b57
BLAKE2b-256 checksum
How to use checksums
e6a4c4669191380c40528b4685357366f77d9c1838f4f2ad7ddc031bf05da602
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.9.1 This release

16 release files

0.9.0

16 release files

0.7.0

2 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