Metadata-Version: 2.4
Name: latticehubanalyser
Version: 0.1.0
Summary: A tool for visualizing, cutting, and analyzing Gwyddion STM lattice files.
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: scikit-image
Requires-Dist: pandas
Requires-Dist: scipy
Requires-Dist: openpyxl
Dynamic: license-file

# Lattice Hub Analyser 

**A unified, semi-automated toolkit for STM lattice analysis, unit cell averaging, and atomic site detection.**

Lattice Hub Analyser takes post-cleansed/mean-plane subtracted Gwyddion STM files (`.npy`) and provides an end-to-end pipeline to visualize, cut, average, and analyze atomic lattices. Whether you want to quickly average a noisy unit cell or run rigorous quantitative comparisons across different datasets, this tool handles the heavy lifting.

## Features

* **Interactive Lattice Picker:** Visually map origin and Bravais vectors.
* **NaN-Median Averaging & Tiling:** Select multiple unit cells across a noisy image to generate a high-precision, averaged, and seamless unit cell.
* **Auto-Detector:** Locate atomic sites automatically using strict spatial constraints and local intensity peaks.
* **Total Lattice Editor:** A multi-window interface to manually refine, map, and export atomic coordinates.
* **Advanced Analysis Suite:**
  * 2D FFT Visualization.
  * Real $\to$ Fractional coordinate conversion.
  * Hungarian Algorithm Bipartite Matching & RMSD calculation to quantify variance between different unit cells.

## Installation

**Option 1: For Python Users**
Install directly via pip:
```bash
pip install latticehubanalyser
```

**Option 2: Standalone Executable (Windows)**
Head over to the [Releases tab](https://github.com/sashamarydp/Lattice-Analysis-Suite/releases) and download `LatticeHub.exe`. Double-click to run—no Python installation required. 

---

### Methodology

For more information on the underlying algorithms, check out the [`methods_explained.ipynb`](notebooks/methods_explained.ipynb) notebook in the `notebooks/` folder for a complete mathematical breakdown.


### Citation
This project is licensed under the MIT License. If you use this tool in your published research, please see the ``CITATION.cff`` file or use the "Cite this repository" button on GitHub.
