Metadata-Version: 2.4
Name: micromechanics
Version: 1.2.1
Summary: Investigation of nanoindentation and SEM data
Home-page: https://micromechanics.github.io/micromechanics/
Author: Micromechanics Team and Steffen Brinckmann
Author-email: sbrinckm@gmail.com
License: MIT
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8
License-File: LICENSE
Requires-Dist: h5py
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: lmfit
Requires-Dist: xlrd
Requires-Dist: pandas
Requires-Dist: matplotlib
Requires-Dist: scikit-image
Requires-Dist: opencv-python
Requires-Dist: typing_extensions>=4.1.0
Dynamic: license-file

# Micromechanics library for experimental micromechanics

This library allows to read datafiles from different nanoindenters and allows to analyse it by evaluating the hardness and Young's modulus using the Oliver-Pharr method. It also includes functions for frame stiffness and area function calibration as well as a number of plotting functions. Additionally the library allows to read SEM images and optimize them

The library can read:
- xls files from the vendors MTS, Agilent, Keysight, which produced the XP and G200 indenters
- txt files from FischerScope
- zip-files which include all the txt files of the Micromaterials NanoXtreme
- HDF5 files produced by the supported converters/common format
- Tif images from Zeiss, NPVE and FEI/ThermoFischer


Install by
``` bash
pip install micromechanics
```

Run test using the default data
``` python
from micromechanics.indentation import Indentation
i = Indentation()
i.plotAll()
```

Alternatively, for Tif images
``` python
from micromechanics.tif import Tif
```

More information as well as tutorials can be found at: [Read the docs](https://micromechanics.github.io/micromechanics/)

If you want to contribute to the development, we develop at [github](https://github.com/micromechanics/micromechanics)


# Contributors
- Steffen Brinckmann
- Velislava Yonkova
- Ruomeng (Nicole) Chen


# Information for developers
Test the code: linting, documentation and then the tests from project main directory
``` bash
pylint $(git ls-files 'micromechanics/*/*.py')
mypy micromechanics
make -C docs html
```
These tests are also executed as github action once pushed.

or the short form to run all the tests
``` bash
python -m unittest tests/test*
```

## For convenience, all tests in one bash command

Check test coverage, including package code and the example files in `docs/source/examples`
``` bash
python -m coverage erase
MPLBACKEND=Agg python -W ignore::UserWarning -m coverage run -m unittest tests/test* > coverage.txt
for f in docs/source/examples/plot_*.py; do MPLBACKEND=Agg python -W ignore::UserWarning  -m coverage run --append "$f" >> coverage.txt; done
grep -P 'ERROR|Error|\*\*ERROR\*\*' coverage.txt
```

Coverage report for LLMs
``` bash
python -m coverage report -m
```
For an HTML coverage report, run
``` bash
python -m coverage html
```
