## Normalize

Normalization is a crucial preprocessing step in spectral analysis that enables the comparison of spectra obtained from different samples or under different conditions. It helps to mitigate the common effect of varying intensity between measurements, which can arise due to factors such as sample preparation, instrumental drift, or changes in experimental conditions. By normalizing the spectra, the relative intensities of the spectral features become more comparable, facilitating accurate interpretation and analysis of the data.

### Minimun-Maximun normalization

Minimum-Maximum normalization is a technique used to rescale the intensity values of a spectrum to fit within a user-defined range, typically between 0 and 1. This is achieved by subtracting the minimum intensity value from each data point and then dividing the result by the range of the intensity values (maximum - minimum).

__Configurable Parameters:__

**Minimum**: The user-defined minimum value for the normalized intensity range (default: 0).**Maximum**: The user-defined maximum value for the normalized intensity range (default: 1).

$y_i^{norm} = \frac{y_i - \min(y)}{\max(y) - \min(y)} \times (M - m) + m$

Where:

$y_i$ is the original intensity value at data point $i$

$\min(y)$ is the minimum intensity value in the original spectrum

$\max(y)$ is the maximum intensity value in the original spectrum

$M$ is the user-defined maximum value for the normalized intensity range

$m$ is the user-defined minimum value for the normalized intensity range

$y_i^{norm}$ is the normalized intensity value at data point $i$ after applying the minimum-maximum normalization

Imagine you have a spectrum representing the absorption of a sample at different wavelengths. The intensity values range from 0.1 to 0.9. To compare this spectrum with others on a consistent scale, you apply Minimum-Maximum normalization with a minimum of 0 and a maximum of 1. This rescales the spectrum to have intensity values between 0 and 1, making it easier to compare with other normalized spectra.

### Peak normalization

Peak normalization is a technique used to scale the intensity values of a spectrum based on a user-defined peak intensity. This method is particularly useful in spectral analysis when comparing spectra with different overall intensities but similar relative peak heights. The normalization is performed by dividing each data point by the intensity value of the specified peak.

__Configurable Parameters:__

**Peak**: The user-defined intensity value to which the spectrum will be normalized.

$y_i^{norm} = \frac{y_i}{y_{peak}}$

Where:

$y_i$ is the original intensity value at data point $i$

$y_{peak}$ is the user-defined peak intensity value

$y_i^{norm}$ is the normalized intensity value at data point $i$ after applying peak normalization

You have a set of spectra representing the emission of a fluorescent dye at different concentrations. The overall intensity of the spectra varies due to differences in concentration, but the relative heights of the emission peaks remain consistent. To compare the spectra, you apply Peak normalization by setting the peak intensity to 1. This normalization allows you to directly compare the relative peak heights across the spectra, regardless of the differences in overall intensity caused by varying dye concentrations.