Skip to main content

A Python package for visualizing and analyzing Atomic Force Microscopy(AFM) and Piezoelectric Force Microscopy(PFM) experimental data, offering tools to process, visualize, and extract meaningful insights from AFM images and measurements.

Project description

AFM-tools is a Python package for loading, processing, and visualizing Atomic Force Microscopy (AFM) and Piezoelectric Force Microscopy (PFM) data.

Installation

Install from PyPI:

pip install AFM-tools

Most users should use this pip install. It includes all core AFM/PFM features. 3D utilities in afm_tools.drawing_3d require mayavi (VTK/Qt stack), which is recommended via Conda.

Install from source:

git clone https://github.com/yig319/AFM-tools.git
cd AFM-tools
pip install -e .

Clone On A New Desktop (Core Pip Environment)

From a fresh machine, this is the recommended setup for core AFM-tools usage:

git clone https://github.com/yig319/AFM-tools.git
cd AFM-tools
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -r requirements-dev.txt
pip install -e .

Optional: 3D environment (Mayavi via Conda)

If you need drawing_3d/Mayavi features:

conda env create -f environment-mayavi.yml
conda activate afm-tools-3d

This Conda environment installs mayavi/vtk/pyqt plus AFM-tools dependencies. Use it when you need 3D visualization.

Quick Start

import numpy as np
from afm_tools.afm_viz import AFMVisualizer

# Example image array (replace with real AFM/PFM image data)
img = np.random.randn(256, 256)

viz = AFMVisualizer()
viz.viz(img=img, scan_size={"image_size": 256, "scale_size": 1, "units": "um"})

Features

  • Read and parse AFM-related wave/image formats.

  • 2D/3D visualization utilities for AFM/PFM datasets.

  • Domain and morphology analysis helpers.

  • Video and plotting utilities for time/scan series.

Documentation

Sphinx documentation is provided in the docs directory.

Build docs locally:

pip install -r docs/requirements.txt
pip install -e .
sphinx-build -b html docs docs/_build/html

License

This project is licensed under the MIT License. See LICENSE.txt.

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

afm_tools-2.0.tar.gz (507.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

afm_tools-2.0-py3-none-any.whl (49.9 kB view details)

Uploaded Python 3

File details

Details for the file afm_tools-2.0.tar.gz.

File metadata

  • Download URL: afm_tools-2.0.tar.gz
  • Upload date:
  • Size: 507.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for afm_tools-2.0.tar.gz
Algorithm Hash digest
SHA256 b048ed25eb52e552f72f7cbd9b286031730137fa675b283696db158e84065873
MD5 8ba677fb1449d7826c2c15303e1bb99b
BLAKE2b-256 f724223f3bdf84335e6fb77c844cb9a4622ada81de4656a60dcff5594fe943ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for afm_tools-2.0.tar.gz:

Publisher: main.yml on yig319/AFM-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file afm_tools-2.0-py3-none-any.whl.

File metadata

  • Download URL: afm_tools-2.0-py3-none-any.whl
  • Upload date:
  • Size: 49.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for afm_tools-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4598f9476a6ece8ea0a256489192a36a9c3c06893cedfbc1db7d764439dd81b1
MD5 78d1437d8b42cc2f05663509087559fa
BLAKE2b-256 9b0af5b2258d42de4181f825ccc470befc85f7f50b52f19b1600fad610df10d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for afm_tools-2.0-py3-none-any.whl:

Publisher: main.yml on yig319/AFM-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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