Skip to main content

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.

Release files for pyMFD 1.0.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 pyMFD 1.0.0
File Size Uploaded
pymfd-1.0.0.tar.gz 17.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyMFD 1.0.0
File Interpreter ABI Platform
pymfd-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 39.2 kB

Release files / pymfd-1.0.0.tar.gz

Download URL pymfd-1.0.0.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8b6912d561038c1cd8b8a873292ef8fee10bf6ae95c008bcd76668b241443b71
BLAKE2b-256 checksum
How to use checksums
0a2641a6595853521783dd0cb1afe4fb19219bd537b5063ab52427dcbf056062
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.11

Release files / pymfd-1.0.0-py3-none-any.whl

Download URL pymfd-1.0.0-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c3d9d705d07f1e5ad09251efe03e3679885e010af9a8b36da14744a16ccf07e
BLAKE2b-256 checksum
How to use checksums
0d289e7030c0a1c7a1b6b4d6386eb6780f25ea90ca0e486caef778dac22f3d58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.11

Release history Release notifications | RSS feed

This release

1.0.0 This release

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