Metadata-Version: 2.3
Name: spectral-line-finder
Version: 0.2.1
Summary: Find and match lines in spectroscopic data from NIST.
Author: David Fokkema
Author-email: David Fokkema <davidfokkema@icloud.com>
Requires-Dist: diskcache>=5.6.3
Requires-Dist: httpx>=0.28.1
Requires-Dist: pandas>=2.3.0
Requires-Dist: platformdirs>=4.5.1
Requires-Dist: textual>=3.5.0
Requires-Dist: textual-plot>=0.10.0.post2
Requires-Dist: typer>=0.16.0
Requires-Dist: beautifulsoup4>=4.14.3
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# Spectral Line Finder

A simple tool to browse, filter and visualize atomic spectral line data in the terminal, built using the awesome [Textual](https://textual.textualize.io/) library. The data is retrieved from the [NIST atomic spectra database](https://physics.nist.gov/PhysRefData/ASD/lines_form.html) and cached on disk. Since the [Trump administration defunded](https://www.npr.org/2025/03/26/nx-s1-5340687/trump-cuts-nist-atomic-spectra-lab-advanced-chips-medical-devices) [the entire atomic spectroscopy group at NIST](https://howonearthradio.org/archives/10056) in 2025 we can only hope this data remains available to scientists. There is [some hope](https://www.callabmag.com/nist-group-finds-new-home/), after all.

## Screenshots

![screenshot of filter dialog](https://raw.githubusercontent.com/davidfokkema/spectral-line-finder/refs/heads/main/docs/images/screenshot-filter.png)

![screenshot of data table](https://raw.githubusercontent.com/davidfokkema/spectral-line-finder/refs/heads/main/docs/images/screenshot-table.png)

![screenshot of spectrum plot](https://raw.githubusercontent.com/davidfokkema/spectral-line-finder/refs/heads/main/docs/images/screenshot-plot.png)

## Usage

To run this application, use uv

```sh
uvx spectral-line-finder
```

or install this package from PyPI.

The filter dialog allows for selecting one or multiple elements and filtering the data based on ionization stage, observed wavelength, relative intensity, or the initial and final energy levels. Once filtered, the data is displayed in a table but the (filtered) spectrum can also be visualized in a spectrum plot.
