Interactive graphical interface for Local Asymmetric Least Squares (LAsLS) baseline correction. Built with MATLAB AppBase plus uihtml (HTML/JS frontend, MATLAB backend).
LAsLS extends Asymmetric Least Squares (AsLS) by allowing interval-specific asymmetry and smoothing parameters for baseline correction. The GUI provides real-time preview, interactive interval drawing, and batch processing for multi-signal datasets.
The GUI can also be used as a standard AsLS corrector, a Whittaker smoother, or a local Whittaker smoother, depending on the parameter configuration.
Reference: Eilers, P. H. C., and H. F. M. Boelens. Baseline correction with asymmetric least squares smoothing. Leiden University Medical Centre Report 1(1), 2005.
Launch from MATLAB:
LASLS- Load data. Click
Loadto import a matrix from the workspace (rows = samples, columns = channels), or a 1D signal vector, which is loaded as one sample. Alternatively, useGenerate demo datafrom the+menu. - Draw intervals. Click
Drawand drag on the preview chart to define peak regions. Each interval gets its own local smoothing and asymmetry parameters. - Tune parameters. Use the
Globaltab for baseline smoothness, asymmetry, and tension. Use theIntervaltab to fine-tune individual intervals. - Preview. The baseline estimate updates in real time as parameters change. The corrected signal is shown in the bottom chart.
- Apply and export. Click
Applyto compute baselines for all samples, thenExportto choose which outputs to save to the workspace. Export names are validated, duplicate names are rejected, and existing workspace variables require overwrite confirmation.
- Real-time baseline preview
- Interactive interval drawing
- Automatic peak detection
- Signal-by-signal navigation
- Per-signal parameter mode
- Batch processing
- Import and export of interval definitions
- Selective workspace export with live name validation and overwrite confirmation
- Custom x-axis support
- Editable axis labels
- Interactive zoom and pan
- Dark mode
- Built-in tutorial
Current version: 1.4
- Version 1.4 (July 2026) — Added selective workspace export. Corrected data, baseline data, weights, and reproducibility parameters can now be exported independently.
- Version 1.3 (June 2026) — Added support for loading one-dimensional signal vectors as single-sample datasets.
- Version 1.2 (April 2026) — Improved workspace export safety with MATLAB variable-name validation, duplicate-name detection, live conflict warnings, and overwrite confirmation.
- Version 1.1 (February 2026) — Fixed custom x-axis interval and peak-distance behavior, improved automatic peak-boundary detection, added editable axis labels and the signal navigator, and refined the chart controls.
- Version 1.0 (February 2026) — Initial LAsLS GUI release with interactive baseline preview, interval-specific parameters, signal-by-signal and batch processing, automatic peak detection, workspace import/export, dark mode, and the built-in tutorial.
| File/Folder | Description |
|---|---|
LASLS.m |
Main app class (MATLAB AppBase) |
LASLS_test.m |
Synthetic data generator for testing |
business_logic/@LASLSCorrector/ |
Core IRLS baseline correction algorithm |
business_logic/@DataValidator/ |
Input validation |
ui/lasls_baseline_correction_ui.html |
HTML/JS frontend |
Add with subfolders to the MATLAB path:
addpath(genpath('path/to/LASLS_GUI'))Built-in MATLAB functions only. No external toolboxes are required.
Released under the MIT License.
- Adrian Gomez-Sanchez -- Universitat de Barcelona and Lovelace Square, Barcelona, Spain
- Berta Torres-Cobos -- University of Copenhagen, Denmark and Lovelace Square, Barcelona, Spain
- Rodrigo Rocha de Oliveira -- Universitat de Barcelona and Lovelace Square, Barcelona, Spain