nanodent
Installation
The Python package nanodent can be installed from PyPI:
python -m pip install nanodent
Development installation
If you want to contribute to the development of nanodent, we recommend the
following editable installation from this repository:
git clone https://github.com/thomasisensee/nanodent
cd nanodent
python -m pip install --editable .[dev,docs,lint,tests]
Having done so, the test suite can be run using pytest:
python -m pytest
Quick Start
nanodent loads .hld as the canonical source.
from datetime import datetime, timedelta
import matplotlib.pyplot as plt
from nanodent import (
load_folder,
plot_experiments,
plot_group_timeline,
save_experiment_plots,
)
study = load_folder("path/to/experiment-folder")
filtered_study = study.classify_quality()
filtered_study = filtered_study.analyze_oliver_pharr()
filtered_study = filtered_study.analyze_hertzian()
hardness_rows = filtered_study.scalar_series("hardness")
pop_in_rows = filtered_study.detect_force_peaks().scalar_series("pop_in_load")
radius_rows = filtered_study.scalar_series("hertzian_radius")
tau_rows = filtered_study.scalar_series("tau_max")
manual_groups = filtered_study.group_by_datetime_ranges(
[
(
datetime(2026, 3, 4, 13, 0, 0),
datetime(2026, 3, 4, 15, 0, 0),
),
]
)
timeline_fig, timeline_ax = plot_group_timeline(
filtered_study,
max_gap=timedelta(minutes=30),
)
fig, ax = plt.subplots()
plot_experiments(
ax,
filtered_study,
fit_kwargs={"color": "gray", "linestyle": "solid", "linewidth": 2},
zero_onset=False,
cmap="rainbow",
)
ax.set_xlabel("Displacement h / nm")
ax.set_ylabel("Force P / μN")
saved = save_experiment_plots(
filtered_study, "plots/", zero_onset=False
)
filtered_study.save_session("analysis-session.pkl")
resumed_study = load_folder("path/to/experiment-folder").load_session(
"analysis-session.pkl"
)
Study.classify_quality() keeps all experiments loaded but marks
heuristically bad runs as enabled=False with a short disabled_reason,
currently including gradual_onset, flat_force, and local-jump outliers
such as outlier_disp or outlier_force.
Grouping and plotting ignore disabled experiments by default; group summaries
include them by default so quality decisions stay visible. Pass
include_disabled=True when you want disabled runs included in plots or
grouping output. plot_experiments(...) and save_experiment_plots(...)
always visualize the test force-displacement curve.
The public API also exposes:
load_experiment(path) -> Experimentload_folder(path) -> StudyStudy.analyze_oliver_pharr(...) -> StudyStudy.analyze_hertzian(...) -> StudyStudy.scalar_series(...) -> list[dict[str, Any]]Study.save_session(path) -> PathStudy.load_session(path) -> StudyStudy.group_by_datetime_ranges(...) -> list[ExperimentGroup]Study.group_by_time_gap(...) -> list[ExperimentGroup]plot_group_timeline(...) -> tuple[Figure, Axes]plot_experiments(...) -> Axessave_experiment_plots(...) -> list[Path]
Demo notebook
Use the demo notebook to test the functionality of nanodent and see how it can be used to analyze and visualize nanoindentation experiments.
Acknowledgments
This repository was set up using the SSC Cookiecutter for Python Packages.
Metadata
Release files for nanodent 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nanodent-0.2.0.tar.gz | 507.6 kB | Without provenance | Details for nanodent-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nanodent-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for nanodent-0.2.0-py3-none-any.whl |
Total release size: 556.9 kB
Release files / nanodent-0.2.0.tar.gz
| Download URL | nanodent-0.2.0.tar.gz |
|---|---|
| Size | 507.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05f100f1ba8ec70eb46f2729f04e2cff6d00319670632f5b8368c93640489d60
|
|
BLAKE2b-256 checksum How to use checksums |
48cda04fe6310096d3b1aaac4eb95962c79f24718bc60314d75520f975dc89dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / nanodent-0.2.0-py3-none-any.whl
| Download URL | nanodent-0.2.0-py3-none-any.whl |
|---|---|
| Size | 49.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c30c723281127b8ecb2d7d5872a08371ce3d0de4cc906930dc23212e69de5e0
|
|
BLAKE2b-256 checksum How to use checksums |
6888b7b2f5ab548a1e095df7dd285373ac1b4f16b67b93cd1c88e6b9e11b0a06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for nanodent 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.