Skip to main content

pyMFD is a tool to analyze atomic force microscope force-volume data of microcantilevers in order to extract Young's modulus.

Project description

Multipoint force-deflection analysis

This library allows for loading Nanoscope v7.2 force-volume data and performing multipoint force-deflection (MFD) analysis. MFD is a local materials characterization technique that performs many force-deflection ramps on a microcantilever. The each force-deflection ramp is converted to a compliance value. The compliance data is fit to a fixed-free Euler beam and Young's modulus is extracted. pyMFD is the first software created for MFD analysis, as it is a new technique.

Installation

Detailed installation instructions are available in the documentation.

      $ git clone https://github.com/larsenkg/pyMFD.git
      $ cd pyMFD
      $ python -m venv env
      $ source env/bin/activate
(env) $ python -m pip install numpy==1.21.2 scipy==1.7.1 matplotlib==3.5.0 \ 
        bottleneck==1.3.2 pytest==7.1.2
(env) $ python -m pytest pyMFD/tests/

Documentation

The documentation is available here.

Compliance map inspector

The compliance map inspector allows for interactive exploration of the compliance map (left) and the force ramps (center) that make up each pixel of the compliance map. One can also view a map of $R^2$ values (right) to get an idea of where the fits might fail.

Example:

import matplotlib.pyplot as plt
from pyMFD.FV import FV
from pyMFD.summarize import comp_mat_inspector
from pyMFD.cantilever import calc_modulus

spm_file        = "data/examples/02041411.001"  # Example force-volume scan
fv              = FV(spm_file)                  # Load force-volume scan
(comp_mat, r2s) = fv.summarize()

# Interactive compliance map inspector
# Use mouse to select pixels in the (left) compliance map.
# The force ramp data is shown in the center plot.
# The R^2 map (how well the force-deflection data was fit) is shown in the right map.
comp_mat_inspector(
    comp_mat, 
    fv.z_piezo, 
    fv.get_retract(), 
    fv.sc_params, 
    r2s_mat = r2s
)
plt.show()

Screenshot of compliance map inspector

Calculate Young's modulus of microcantilever

# Continued from above
cant_num    = 0 # Cantilever number
rows_to_avg = 3 # Number of rows to average around center line of cantilever

(E, offset, E_lin, offset_lin) = calc_modulus(fv, cant_num)

print("---- Cubic fit ----")
print(f"Young's modulus: {E/1e9:.2f} GPa")
print(f"Offset: {offset*1e6:.2f} µm")

print("---- Linearized fit ----")
print(f"Young's modulus: {E_lin/1e9:.2f} GPa")
print(f"Offset: {offset_lin*1e6:.2f} µm")

Output:

---- Cubic fit ----
Young's modulus: 145.97 GPa
Offset: 4.14 µm
---- Linearized fit ----
Young's modulus: 158.66 GPa
Offset: 4.04 µm

Community guidelines

If you are having issues installing or using this software, or would like to report a bug, please create a new issue in this repository. Please provide as much information as possible, including a reproducible example (if applicable).

Feature requests and pull requests are welcome. If you would like to contribute, but do not know where to start, you may create a new issue. Please let us know your interests and how you would like to help.

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

pymfd-1.0.0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

pymfd-1.0.0-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file pymfd-1.0.0.tar.gz.

File metadata

  • Download URL: pymfd-1.0.0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.11

File hashes

Hashes for pymfd-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8b6912d561038c1cd8b8a873292ef8fee10bf6ae95c008bcd76668b241443b71
MD5 c708d90794445ae0422ab60d7b33169a
BLAKE2b-256 0a2641a6595853521783dd0cb1afe4fb19219bd537b5063ab52427dcbf056062

See more details on using hashes here.

File details

Details for the file pymfd-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pymfd-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.11

File hashes

Hashes for pymfd-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c3d9d705d07f1e5ad09251efe03e3679885e010af9a8b36da14744a16ccf07e
MD5 cad36e51c9213dc3b3a1b6a383b30d08
BLAKE2b-256 0d289e7030c0a1c7a1b6b4d6386eb6780f25ea90ca0e486caef778dac22f3d58

See more details on using hashes here.

Supported by

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