IR Spectroscopy and Reference Spectrum Matching
GX-TXT DEV112 P011-bis
Acquire an IR spectrum and match it against the RefIMP library using a reproducible example and the compatibility CSV format.
Enable IR Spectroscopy and Reference Matching
In Configuration → Modules → Analysis & Services choose IR Spectroscopy and Reference Matching (analysis.spectroscopy.ir 1.2.0 in P011-bis). With Health Available and state CORE / OFF press Enable module. In Analysis select Run / recalculate now. The module produces canonical Datasets, a report and the plot of the first candidate.

Install the RefIMP corpus and generate the data
- In Configuration → Libraries → Open Libraries… uses Install managed package… with the managed RefIMP full training Library (42 MB), ID
tum.refimp.ftir.training.2022. - In New Session… → Generate Session… → Manage Libraries… uses Create Library…, select the new library, then Import Generator… with the Generator RefIMP 1.1.0 (ZIP). Go back to the catalog, select RefIMP full-training IR matching study, assign the name and press Generate Session.
- The Session contains
ir.refimp.item13HDF5 andir.refimp.csv_compatCSV, two forms of the same measurement with 637 pairs. Enable the source in Dataset → Preview and compare quantity, unit and origin in Technical details.
RefIMP data, Jana Weisser and Teresa Pohl (2022), CC BY-SA 4.0. The preparation keeps the values converted from the original dataset. Official mediaTUM source.


Bind the columns and declare the ordinate
For the P011-bis Analysis panel, enable ir.refimp.csv_compat in Dataset → Variables. In the second row change only Canonical variable from relative_transmission_signal to signal and save. The original header stays relative_transmission_signal. This step aligns the name shown in the menu with its stable identifier. With the long name the GUI shows the field, but Run rejects it. In this test auto is also rejected because X and Y must be declared.

In Dataset sources choose ir.refimp.csv_compat for primary. The mandatory row has Remove disabled. In Input variable bindings set IR spectral coordinate to primary.wavenumber and Measured IR signal to primary.signal.
Measured ordinate representation (confirm explicitly) proposes absorbance, which applies if the measurement is in absorbance. Choose absorption_index for the optical index k, transmittance_fraction for a 0–1 fraction, transmittance_percent for a percentage and relative_transmission_signal for the RefIMP relative signal. The declaration controls the representation and the compatibility of the references. For the test keep relative_transmission_signal.
Installed reference library IDs (semicolon separated) accepts managed IDs with the separator ;. The initial value tum.refimp.ftir.2022 refers to the small collection. The full case requires tum.refimp.ftir.training.2022.

Limit and prepare the data
- Minimum / Maximum wavenumber [cm⁻¹]
- Define the requested interval, initially 500–3700 cm⁻¹. The effective interval depends on the intersection of the available data. Check it in the results.
- Baseline correction
noneleaves the baseline,linearsubtracts a linear trend andpolynomialuses a polynomial of the degree set in Polynomial baseline degree, initially 2.- Smoothing
noneleaves the sampling unfiltered.moving_meanaverages the neighbors,local_polynomialestimates with local polynomials andsavitzky_golayuses Savitzky–Golay smoothing. Odd smoothing window [samples] is the odd width of the window, initially 9 samples. Choose a window consistent with the width of the bands to keep.- Comparable intensity normalization
unit_vectorbrings the norm of the vector to 1.mean_center_unit_vector, the default, subtracts the mean and then normalizes the norm. The parameter concerns the data used for matching, while Display normalization in the plot only adjusts the view.- Derivative order
0keeps the signal at the preprocessing level,1uses the first derivative and2the second. The compared references follow the same preparation path when compatible.- Matching grid step [cm⁻¹]
- The spacing of the working grid for matching. The initial value is 4 cm⁻¹. A smaller step increases the number of computed points.
In the RefIMP lab use none for baseline and smoothing, order 0, mean_center_unit_vector and step 4 cm⁻¹.
Configure the ranking and the bands
- Full-range matching score
cosineuses the cosine between vectors,pearsonthe correlation,spectral_anglethe similarity based on the spectral angle,normalized_residualthe similarity based on normalized residuals.cosineis the default.- Fingerprint lower / upper bound [cm⁻¹]
- Limit the region to give a dedicated weight, initially 500–1500 cm⁻¹.
- Fingerprint score weight [0..1]
- Weight from 0 to 1. The proposed value is 0.35. For ItemID 13 use 1300–1800 cm⁻¹ and 0.35.
- Peak prominence threshold (processed units)
- Minimum prominence for recognizing a peak on the prepared signal. Start from 0.03.
- Peak-position tolerance [cm⁻¹]
- Allowed distance for matching peak positions. Start from 16 cm⁻¹.
- Top-ranked candidates
- Maximum number of candidates returned, 10 to start. The list can have fewer rows than the maximum. The corpus and the rows examined are given in the report.
- Minimum score for a convincing match
- Initial threshold 0.6, compared with the first candidate for the report status. The threshold describes the criterion adopted. Interpret data, material, representation and interval in any case.
To compare a shorter processing path, also install the managed RefIMP collection with 15 entries (ZIP). Replace the libraries field with tum.refimp.ftir.2022, use pearson, baseline linear, smoothing moving_mean, unit_vector and at most three candidates. The test examined 15 exact references and the first PP scored about 0.9964. The catalog and the preparation differ, so the two scores must be interpreted within their own paths.
With the reduced collection these also succeeded: spectral_angle and normalized_residual with local_polynomial. On the test spectrum the axis step is not uniform. The module rejected savitzky_golay with a message that requires a uniform grid and indicates local_polynomial as a suitable choice. After replacing the smoothing, the Run with normalized_residual succeeded.
Run, read the candidates and open the comparison
In Run check the plan, start the Analysis and wait for Selective analysis completed. The lab publishes .ir.processed for the prepared signal, .ir.peaks for the peak positions, .ir.candidates for the ranking and .ir.overlay for the measurement and reference pair. The IDs start with ir.refimp.csv_compat. In Dataset enable the product, open Preview and then Open Dataset → Canonical table to look at the values. Metadata shows the provenance and Technical details confirms format and variables.
The candidate table gives rank, identifiers, library version and fingerprint, material, combined score, full-band and fingerprint scores, peak matching, interval and warnings. In Results read ir_analysis_report.txt. The full Run prefilters 9,537 entries, re-examines 30 exact candidates and publishes 10 rows. refimp-train-00013 comes first with 1.0 and matches the ItemID of the source. The scores are similarity indices. Use the effective interval and the warnings to put them in context.

Customize the plot of the measurement and the first candidate
In Plots select 01_ir_overlay. The curves show the measurement and the first reference in the form used for matching. Check the wavenumber axis and the ordinate scale. The corresponding row Plot p… is the persistent variant. Select it and use Presentation → Title and labels…. Change Graph title, save and use Render → Rerender. Open the artifact with Graph → Open PNG 1:1.

