Skip to main content

A Python library for Atom Probe Tomography analysis

Project description

APAV: Python for Atom Probe Tomography

Documentation Status coverage report pipeline status License: GPL v2 PyPI version status

APAV (Atom Probe Analysis and Visualization) is a Python package for analysis and visualization of atom probe tomography datasets, some features:

  • File read support for traditional (*.pos, *.epos, *.ato, *.rng, *.rrng) or new (*.apt) formats
  • File write support for *.pos and *.epos
  • Mass spectrum quantification with configurable background correction
  • Calculation and configuration of correlation histograms
  • Roi primitive shapes for localized analysis
  • Most analyses can be parameterized by multiple-detection events
  • Fast generation of the compositional grid using conventional 1st/2nd pass delocalization
  • Calculation of arbitrary molecular isotopic distributions

Basic usage

Essential APT analysis typically involves loading some data and doing some calculation(s). Import the core functions and classes:

>>> import apav as ap

Load an apt file from AP Suite or some other source, along with a suitable range file (or build one programtically):

>>> roi = ap.load_apt("data/NiTiHf.apt")
>>> rng = ap.load_rrng("data/NiTiHf_FWHM.rrng")

Now import the analysis components and compute the total (uncorrected) decomposed composition:

>>> import apav.analysis as anl
>>> mass = anl.RangedMassSpectrum(roi, rng, decompose=True)
>>> mass.print()
Ion      Composition    Counts
-----  -------------  --------
Ti        0.307084     2381757
Ni        0.595634     4619772
Hf        0.0907196     703626
O         0.00656261     50900

Estimate the (uncorrected) composition of a grain in the upper part of the ROI using a sphere:

>>> precip_roi = ap.RoiSphere(roi, center=(-8.5, 2.1, -20), radius=20)
>>> precip_mass = anl.RangedMassSpectrum(precip_roi, rng, decompose=True)
>>> precip_mass.print()
Ion      Composition    Counts
-----  -------------  --------
Ti        0.397016      261053
Ni        0.532445      350102
Hf        0.0665544      43762
O         0.00398457      2620

Check the documentation for more analyses and background corrections.

Documentation

Documentation is found at: https://apav.readthedocs.io/

Support

Post discussion to the GitLab issue tracker

FAQ

Why use this over IVAS/AP Suite or program X?

APAV is not intended to be an IVAS substitute or replacement. While much of the functionality may overlap, APAV fills feature gaps in IVAS/AP Suite that are lacking or otherwise non-existent. Specifically:

  1. Multiple-event analysis (i.e. correlation histograms, multiple event histograms, multiple event mass quantifications).
  2. Manual control over mass spectrum analysis (background models, fit regions, binning, etc).
  3. An API to easily interface into APT data for custom data analysis.

Why is there no GUI for APAV?

APAV is intended to be used as a python library. Perhaps a GUI will one day exist along side APAV (but not in replacement). For now, APAV includes some custom interactive plotting tools for certain computations.

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

APAV-1.4.0.tar.gz (57.3 MB view hashes)

Uploaded Source

Built Distributions

APAV-1.4.0-cp311-cp311-win_amd64.whl (57.8 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

APAV-1.4.0-cp310-cp310-win_amd64.whl (57.8 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

APAV-1.4.0-cp39-cp39-win_amd64.whl (57.8 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

APAV-1.4.0-cp38-cp38-win_amd64.whl (57.8 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

APAV-1.4.0-cp37-cp37m-win_amd64.whl (57.8 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

Supported by

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