An interactive viewer for spectra from the GALAH DR4 catalog (Galactic Archeology with Hermes Data Release 4). The application allows you to explore stellar spectra intuitively, with support for multiple bands, reference spectral lines, and automatic spectral classification.
- Interactive Visualization: Plotting of 4 spectral bands (Blue, Green, Red, IR) with interactive interface
- Spectral Lines: Overlay of reference spectral lines from GALAH DR4 with groups (CNO, Alpha-process, Iron-peak, etc.)
- Local Data: Direct reading of FITS files from the local dataset
- Stellar Metadata: Display of information such as Teff, log(g), [Fe/H] and other abundances
- Python 3.8+
- GALAH DR4 Datasets (FITS files)
git clone https://github.com/pedroiff0/spectraviewer.git
cd spectraviewerpython3 -m venv venv
source venv/bin/activate # macOS/Linux
# or
venv\Scripts\activate # Windowspip install -r requirements.txtstreamlit run spectraviewer.pyThe application will open at http://localhost:8501.
- Search: Select a star from the dropdown menu
- View Spectrum: The 4-band spectrum will be loaded and displayed
- Spectral Lines: Select groups of spectral lines to overlay on the spectrum
- Labels: Enable the "Show line labels" option to display line identifications
- Location:
spectra/galah/dr4/spectra/hermes/com/{YYMMDD}/ - File:
{sobject_id}{CCD}.fits - Bands:
- CCD 1: Blue (~4713 Å)
- CCD 2: Green (~5648 Å)
- CCD 3: Red (~6478 Å)
- CCD 4: IR (~7585 Å)
- TEFF_R: Effective temperature
- LOGG_R: log(g) - surface gravity
- FE_H_R: Metallicity [Fe/H]
- A_FE_R: Abundance [α/Fe]
- SNR_AA: Signal-to-noise ratio in Ångströms
- RV: Radial velocity
- E_RV: Error in radial velocity
- GALAH DR4 Survey
- Gaia-ESO Spectroscopic Survey
- Streamlit Documentation
- Plotly Documentation
- Astropy FITS
spectraviewer/
├── spectraviewer.py # Main application
├── requirements.txt # Python dependencies
├── class.txt # Spectral classification catalog
├── spectra/ # Data (included with samples)
│ └── galah/
│ └── dr4/
│ └── spectra/ # FITS spectrum files
├── venv/ # Virtual environment
└── README.md # This file
- Modify
spectraviewer.py - Test locally:
streamlit run spectraviewer.py - Commit and push to GitHub
- Verify that FITS files exist in
spectra/galah/dr4/spectra/hermes/com/ - Confirm that the
sobject_idis correct (15 digits)
- Verify that the line list file exists
- Confirm that the wavelengths of the lines are within the spectral coverage range
- Resize the plots
- Reduce the number of selected line groups
- Check disk read speed for FITS files
This project uses data from the GALAH DR4 Survey. Respect the terms of use of the data.
Contributions are welcome! Please:
- Fork the repository
- Create a branch for your feature (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For questions, bug reports or suggestions, open an issue in the repository.
Last update: May 2026
Version: 1.0.0