Metadata-Version: 2.5
Name: plesty-fss
Version: 0.1.0.dev1
Summary: A plesty fine-structure analyzer: exciton fine-structure splitting from polarization-resolved PL spectra.
Author-email: Yunshuang Yuan <yuanyunshuang@gmail.com>
Maintainer-email: Plesty Development Team <plesty.dev@example.com>
License-Expression: LGPL-3.0-or-later
License-File: LICENSE
License-File: LICENSES/LGPL-3.0-or-later.txt
Requires-Python: >=3.12
Requires-Dist: numpy
Requires-Dist: plesty-lib[fit]>=0.5.0.dev1
Description-Content-Type: text/markdown

# Plesty Fine-Structure Analyzer

A PLESTY analyzer for the exciton fine-structure splitting (FSS) of every line in a
polarization-resolved PL sweep.

## Installation

```bash
uv add plesty-fss
```

or, from source:

```bash
git clone https://gitlab.com/plesty/hub/analyzers/plesty-fss.git
cd plesty-fss
uv sync
```

## Running the analyzer

```python
from plesty.lib.data import SpectrumData
from plesty.fss import FineStructure

spectrum = SpectrumData.from_run(run, coordinates=("hwp_deg",))
outputs = FineStructure(
    angle="hwp_deg",
    rotator="hwp",  # "polarizer" for a rotating polarizer
    fit_options={"peaks": [775.0], "window": 0.3},
)(spectrum=spectrum)

result = outputs["fine_structure"]
result["fss"], result["fss_err"]  # µeV, one per line
result["fss_wavelength"]  # the same splitting in the wavelength unit
```

`fit_options` are passed to `plesty.lib.analyzer.SpectrumFit`. See the documentation for the
outputs and the model.
