Skip to content

Repository files navigation

OAS Spectrum Studio

A single-screen analyser for Optical Absorption Spectroscopy, grown by the community.

Live demo Python 3.11 MIT licence Continual learning

▶ Try it live  ·  Watch the 3-min demo  ·  Cite


OAS Spectrum Studio — click to open the live web app


oas_demo_drag_this.mp4

What it does

OAS Studio takes a measured optical absorption spectrum, separates it into the contributions of eight chemical species (HONO, HONO₂, N₂O₄, N₂O₅, NO, NO₂, NO₃, O₃), and returns calibrated number densities together with a validation overlay — typically in under a second.

Two analysis paths share the same UI, and the same UI scales from a single spectrum to a 343-frame time-series with no relearning:

Path Method Best for
Linear regression Positive NNLS + O₃-peak clipping + iterative false-positive suppression Trusted labels, R² > 0.92 on the reference series
Machine learning ResNet-101 over the OD curve rendered as an image Quick first-pass on novel spectra; opted-in submissions feed the next checkpoint

Opt-in submissions flow into a Supabase-backed continual-learning loop (architecture). Each release credits its contributors.

Quick start

Option 1 — use the live app

No install. Open https://oas-spectrum-studio.streamlit.app, sign in with the credentials you received (see Access below), and drag in your spectrum files.

Option 2 — run locally

git lfs install                              # one-time per machine
git clone https://github.com/jongchan1999/oas-spectrum-studio.git
cd oas-spectrum-studio
pip install -r requirements.txt
streamlit run app.py

Then open http://localhost:8501.

Two runtime assets are pulled automatically by git clone (LFS enabled):

  • machine_learning/exp_4_epoch_3000.pth — baseline ResNet-101 checkpoint (~170 MB, LFS)
  • Cross_sections_modified/*_ordered_cross_section.txt — 8 species reference spectra (plain text)

Input format

A spectrum file is two columns (wavelength · intensity), whitespace / comma / tab separated. SpectraSuite headers are recognised automatically.

wavelength_nm intensity
210.00 0.0123
210.50 0.0131
...

For a time-series upload, the file with the lowest numeric suffix is treated as I₀ (for example Source_70_2_00000.txt); the rest are processed in ascending suffix order.

Continual-learning loop

Phase What it does Where
1. Submit Authenticated app POSTs each opted-in analysis to a Supabase Edge Function supabase/ + oas_web/cl_submit.py
2. Curate Weekly GitHub Action validates, dedupes, and packs new rows into a release pack scripts/curate.py + .github/workflows/curate.yml
3. Fine-tune Same workflow re-trains the ResNet on the growing corpus, gated on per-species RMSE deltas machine_learning/finetune.py + .github/workflows/finetune.yml

End-to-end architecture, paper-track addendum, and release versioning are documented in docs/CONTINUAL_LEARNING.md. To run your own Supabase backend, follow supabase/README.md.

Project layout

Path Purpose
app.py Streamlit UI — single page, ~1.5k LOC
oas_web/ Analysis core: OD computation, NNLS, ResNet inference, plot factories, submission + curation clients
machine_learning/ Baseline ResNet-101 checkpoint (LFS, ~170 MB) + Phase-3 fine-tune / eval harness + reference training architecture
scripts/ CLI wrappers for curation, fine-tune, and corpus-seeding jobs
supabase/ Edge function (validate / hash / store) + Postgres schema for opt-in submissions
Cross_sections_modified/ 8 species cross-section reference spectra
docs/ Continual-learning architecture · conference slide / poster template
.github/workflows/ curate.yml (weekly) · finetune.yml (manual dispatch)

Citation

If you use OAS Studio in a publication, please cite all three entries — the software entry alone is not sufficient.

  1. Methodology. Kim, J. et al. Deep spectral deconvolution for image-based broadband spectral data analysis. Sensors and Actuators B: Chemical (2026). doi:10.1016/j.snb.2025.139369

  2. Plasma OAS context. Huh, S.-C. et al. Plasma Sources Sci. Technol. 33, 075007 (2024). doi:10.1088/1361-6595/ad5ebb

  3. Software. Kim, J. & Park, S. OAS Spectrum Studio — a Streamlit analyser for optical absorption spectroscopy with a continual-learning loop. APRIL Lab, KAIST (2026). https://github.com/jongchan1999/oas-spectrum-studio

BibTeX
@article{Kim2026DeepSpectralDeconvolution,
  title   = {Deep spectral deconvolution for image-based broadband spectral data analysis},
  author  = {Kim, Jongchan and Huh, Seong-Cheol and Bae, Jin Hee and Shin, Su-Jin and Park, Sanghoo},
  journal = {Sensors and Actuators B: Chemical},
  year    = {2026},
  doi     = {10.1016/j.snb.2025.139369}
}
@article{Huh2024PlasmaSources,
  author  = {Huh, Seong-Cheol and others},
  journal = {Plasma Sources Science and Technology},
  volume  = {33}, number = {7}, pages = {075007}, year = {2024},
  doi     = {10.1088/1361-6595/ad5ebb}
}

Machine-readable metadata: CITATION.cff.

License

MIT © 2026 Jongchan Kim & APRIL Lab, KAIST. Permissive use, modification, and redistribution; please keep the copyright notice intact.

Access

The source code is open and MIT-licensed — clone, fork, or run it locally without asking. The live Streamlit deployment is the only gated piece: it uses per-person logins so we can keep the model load predictable while we iterate.

To request a login for https://oas-spectrum-studio.streamlit.app, email one of the maintainers below with your name, affiliation, and what you plan to analyse.

Contact

Role Person Email
Principal investigator Sanghoo Park sanghoopark@kaist.ac.kr
Maintainer / lead developer Jongchan Kim kimjongchan@kaist.ac.kr

Bug reports and feature requests: open an issue.

Developed at APRIL Lab (Applied Plasma Research & Innovation Lab), KAIST · 2026

About

OAS Spectrum Studio - Streamlit web app for Optical Absorption Spectroscopy analysis

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages