Metadata-Version: 2.4
Name: pyAthina
Version: 0.1.0
Summary: A photoelectron microspectroscopy/spectromicroscopy data analyis package
Author-email: Evangelos Golias <evangelos.golias@gmail.com>
Project-URL: Homepage, https://gitlab.com/evangelosgolias/athina
Project-URL: Issues, https://gitlab.com/evangelosgolias/athina/-/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# pyAthina

A lightweight PyQt6 + pyqtgraph skeleton for PEEM-style image-stack workflows.

## Install

```bash
pip install -r requirements.txt
```

## Run

Any of these should work from the extracted project folder:

```bash
python -m pyAthina.main
```

```bash
python -m pyAthina
```

```bash
python run_pyAthina.py
```

If you `cd` into the `pyAthina/` subfolder itself, you can also run:

```bash
python main.py
```


## Alignment modes

- **Phase correlation**: translation-only drift correction with sub-pixel shift estimation.
- **Image registration**: ECC-based registration on the ROI, with the estimated transform applied to the full image.
  - default: sub-pixel translation
  - optional: rotation
  - optional: scale
  - optional: skew

When scale or skew is enabled, the registration model becomes affine.


## Z profile improvements

- live ROI-driven z-profile updates while moving or resizing the ROI
- standalone popup plot window
- plot styling controls (grid, markers, line width)
- export z-profile as TXT (x, y columns)
- export plot as PNG


## Line profile

- Click **Line profile using line ROI**.
- Then press and drag on the image to draw the line.
- The popup profile updates when you move the line endpoints or change stack layer with the slider.
- The profile width is controlled by **Profile width (px)** in the Profiles dock.


## Xarray-backed import and axis metadata

The stack import layer creates an `xarray.DataArray` with dims `(z, y, x)`.

No sample data or synthetic coordinate ranges are enabled by default.
When file metadata is missing, pyAthina falls back to:

- `x`: pixel index (`0 .. nx-1`)
- `y`: pixel index (`0 .. ny-1`)
- `z`: layer index (`0 .. nz-1`)

HDF5 metadata parsing helpers are included, but the final mapping of file metadata into domain-specific xarray attrs is intentionally left as a placeholder for user customization.
Commented debug snippets remain in the codebase so synthetic data can be re-enabled temporarily when needed.
