pybaseline_loop is a graphical Python application for batch processing and baseline correction of SWV (Square Wave Voltammetry) data files. It provides a user-friendly interface to select input folders, configure data import options, and export processed results and plots.
- Batch processing of
.txt
SWV data files. - Automatic smoothing of signals using the Savitzky-Golay filter.
- Baseline estimation and correction using the asPLS algorithm from
pybaselines
. - Export of processed data to CSV or Excel.
- Export of annotated signal plots as PNG images.
- Results summary in a multi-index Excel file.
- Progress bar and log window for monitoring processing.
- Cross-platform GUI (Windows, macOS, Linux).
- Python 3.8+
- numpy
- pandas
- matplotlib
- pybaselines
- scipy
- openpyxl
- tkinter (usually included with Python)
Install dependencies with:
pip install pybaselines numpy pandas matplotlib scipy openpyxl
-
Launch the application:
python pybaseline_loop.py
-
Select the input folder containing your
.txt
SWV files. -
Configure import options:
- Column separator (Tab, Comma, Semicolon, Space)
- Decimal separator (Point or Comma)
- Export options for processed data (None, CSV, Excel)
- Export options for plots (None, PNG)
-
Click
Lancer l'analyse
to start processing. -
Monitor progress in the log window and progress bar.
-
Open the results folder
using the provided button after processing.
- The application expects
.txt
files with two columns: Potential and Current. - The first row is skipped (assumed to be a header).
- File names must match the pattern:
*_NN_SWV_CNN_loopN.txt
where:NN
= variant/frequency (2 digits)CNN
= channel (e.g., C01)loopN
= iteration number
- Processed data files (
.csv
or.xlsx
) for each input file (optional). - Annotated plots (
.png
) for each input file (optional). - A summary Excel file with all results, organized by loop, channel, and variant.
- Dossier d'entrée: Select the folder containing
.txt
files. - Paramètres de lecture: Set column and decimal separators.
- Export des fichiers traités: Choose export format for processed data.
- Export des graphiques: Choose whether to export plots.
- Progression du traitement: Shows progress bar.
- Journal de traitement: Displays processing log and errors.
- Lancer l'analyse: Start processing.
- Ouvrir le dossier de résultats: Open the output folder.
Suppose your folder contains files like:
sample_01_SWV_C01_loop1.txt
sample_01_SWV_C01_loop2.txt
sample_02_SWV_C02_loop1.txt
...
After processing, you will find:
sample_01_SWV_C01_loop1.png
(if plot export enabled)sample_01_SWV_C01_loop1.csv
or.xlsx
(if data export enabled)YourFolderName.xlsx
(summary file with all results)
MIT License. See LICENCE for details.
Note:
This application uses the asPLS algorithm from pybaselines for baseline correction.