0 ×

Baseline Subtraction

MassSpectInKnime2 version 1.0.1

This node is useful to subtract baseline noise from mass spectra, supports multiple types of baseline subtraction. For each row in the input data, we calculate the baseline for windows across the whole spectra, then remove the baseline value from all values in that given window. Once this is done, we remove all negative values and set them equal to zero.


Baseline Type

If chosen, the baseline is calculated as the minimum of the values in each window.
If chosen, the baseline is calculated as the median in each window.
If chosen, the baseline is calculated as the morphological operator tophat of the values in the window. This means the opening, which refers to the dilation of the erosion.
Optimal Tophat
If chosen, the baseline is calculated using morphological operators. Specifically, it is the minimum of the opening, and the average between the dilation of the opening, and the erosion of the opening. As explained by Roasanna Perez-Pueyo, Maria Jose Soneira and Sergio Ruiz-Moreno in Morphology-Based Automated Baseline Removal for Raman Spectra of Artistic Pigments.

Input Ports

Rows of data that we wish to remove the baseline from. Typically, this will be mass spectrometry intensity data.

Output Ports

This port outputs the baselines calculated for each row of incoming data.
This port outputs the original data with the baseline subtracted.


To use this node in KNIME, download the below referenced file, save it to your KNIME's plugin folder and restart KNIME.


You don't know what to do with this link? Read our NodePit Product and Node Installation Guide that explains you in detail how to install nodes to your KNIME Analytics Platform.

Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform. Browse NodePit from within KNIME, install nodes with just one click and share your workflows with NodePit Space.


You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.