TopoStats
An AFM image analysis program to batch process data and obtain statistics from images
Install / Use
/learn @AFM-SPM/TopoStatsREADME
TopoStats
<div align="center"> </div> <div align="center"> </div> <div align="center">| Installation | Tutorials and Examples | Contributing | Licence | Citation |
</div>An AFM image analysis program to batch process data and obtain statistics from images.
There is more complete documentation on the projects documentation website.
Installation
TopoStats is available via PyPI and can be installed in your Virtual Environment with...
pip install topostats
For more on installation and how to upgrade please see the installation instructions.
NB The minimum supported version of Python is >=3.10 and because of a constraint in a dependency the maximum supported version is <= 3.11 (for now, we hope to support newer versions in the near future).
How to Use
Tutorials and Examples
For a full description of usage please refer to the usage documentation.
A default configuration is loaded automatically that works with .spm files. The simplest method of processing images
is to run topostats process in the same directory as your scans after having activated the virtual environment in
which you have installed TopoStats
topostats process
If you have files other than .spm please refer topostats --help and the documentation on how to process those images
with TopoStats.
NB If your configuration specifies .spm (the default) files with the old-style Bruker extension (i.e. .001,
.002 etc.) will also be processed.
If you have your own YAML configuration file (see Usage : Configuring
TopoStats) then invoke topostats
and use the argument for --config <config_file>.yaml that points to your file with an associated module of
TopoStats e.g. process.
# Edit and save my_config.yaml then run TopoStats with this configuration file
topostats --config my_config.yaml process
The configuration file is validated before analysis begins and if there are problems you will see errors messages that are hopefully useful in resolving the error(s) in your modified configuration.
You can generate a sample configuration file using the topostats create-config argument which writes the default
configuration to the file ./config.yaml (i.e. in the current directory). This will not run any analyses.
Notebooks
Example Jupyter Notebooks have been developed that show how to use TopoStats package interactively which is useful when you are unsure of what parameters are most suited to your scans. Other notebooks exist which show how to produce plots of the summary grain and tracing statistics or how to generate plots of scans from processed images which saves having to run the processing again. See the documentation on Notebooks for further details.
Contributing
Please refer to our contributing guidelines documentation.
Licence
This software is licensed as specified by the GPL License and LGPL License.
Citation
If you use TopoStats in your work or research please cite us. There is a Citation File Format in this repository to aid citation.
Publications
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
107.6kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
346.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
