Spectral-Cockpit

Swiss Infrared Spectroscopy Meeting 2026

Philipp Baumann | baumann-philipp@protonmail.ch

About me 1/2

  • Currently Lead Data Scientist at Headquarters of Alliance SwissPass
    • Leading simulations of revenue distribution methods in the new central tariff in public transport
    • Set up enterprise data science environment in cloud (Infrastructure as Code, modern container-driven CI/CD app, …)
    • Building travel data applications and expanding infrastructure for the new analytics reporting for public transportation (data lake, publication platform)
  • R&D: Since 2015. 2021: Developing the Swiss mid-infrared soil spectral library for local estimation and monitoring (PhD, ETHZ). 2021-2023: Soil data science at KOBO. 2023–now: Spectral-Cockpit.

About me 2/2

  • Interests, Tools & Philosophy
    • Operationalizing spectroscopy and advanced analytics
    • Progressive IT and analytics stack
    • Open Source Tools:
      • e.g., {rix}: Reproducible Data Science environments for R with Nix docs.ropensci.org/rix/

Some of my (soil) data science journeys 📈 🤎

PhD (2016-2021)

  • method development
    • interpretable & applicable machine learning with mid-IR spectroscopy
    • Swiss-wide models (rule-based modeling)
    • PoC: Predictability of SOC trends at NABO sites (transfer learning)

💡 Detecting management-induced changes

💡 Detecting management-induced changes

  • get more soil estimates with minmal laboratory efforts (i.e., 10 samples)
    • targeted information retreival from SSL/training sets
  • obtain relatively unbiased trajectories of SOC to detect changes

Spectral-Cockpit: “Scale-up chemical diagnostics”:

  • FLOSS: Community projects:
  • Analytics Platform: automation for research labs and commercial services. Holistic consulting.

Spectral-Cockpit: Where it started?

)

Automation starts in the lab and with data collection

Bruker Alpha mid-infrared spectrometer | soil samples in plate for Bruker Vertex 70

  • Getting data out of spectra is often unclean
    • Binary formats can be proprietary
    • Or hacky workarounds and old-fashioned formats
  • Spectra contain a lot of useful information on quality and they also contain single channel spectra
  • Scale up spectral diagnostics and build spectral libraries

Meet {opusreader2}

  • Read OPUS binary files from Fourier-Transform Infrared (FT-IR) spectrometers of the company Bruker Optics GmbH & Co. in base R
    • The Bruker corporation produces reliable instruments
    • However, there is no official documentation for the OPUS file format, making it proprietary
    • Import OPUS measurement data and parameters with ease
  • https://codefloe.com/spectral-cockpit/opusreader2/

Meet {opusreader2}

  • Organizations and projects using {opusreader2}:
    • CSIRO: https://github.com/csiro/soilspec.format
    • ETH Zürich: Sustainable Agroecosystems and Soil Resources labs
    • Open Soil Spectral Library: https://docs.soilspectroscopy.org/soilspec.html#software
    • OpenSpecy: https://www.plastiverse.org/tools/openspecy
    • Kompetenzzentrum Boden (KOBO)
  • Passes all checks, CRAN submission today

Meet {opusreader2}

https://opusreader2.spectral-cockpit.com

{opusreader2}: Getting started

if (!require("remotes")) install.packages("remotes")
remotes::install_git("https://codefloe.com/spectral-cockpit/opusreader2")
  • Read example files shipped with the package
Code
library("opusreader2")

dsn <- opus_test_dsn()
data <- read_opus(dsn = dsn)
print(data)
╔==============================================================================╗ 
                      OPUS collection with 5 spectra                       
╚==============================================================================╝ 
Measurement metadata:
* date-time range (UTC): [2015-11-06 13:39:33 , 2021-11-09 14:57:44]
 
* data blocks (#spectra) ------------------------------------------------------- 
   ab (4);   ab_no_atm_comp (2);   ig_ref (3);   ig_sample (3); 
  match (1);   match_2_chn (1);   refl_no_atm_comp (1);   sc_ref (5); 
  sc_sample (5);
 
* parameter blocks (#spectra) -------------------------------------------------- 
   ab_data_param (4);   ab_no_atm_comp_data_param (2);   acquisition (5); 
  acquisition_ref (5);   fourier_transformation (5); 
  fourier_transformation_ref (5);   ig_ref_data_param (3); 
  ig_sample_data_param (3);   info_block (3);   instrument (5); 
  instrument_ref (5);   lab_and_process_param_processed (3); 
  lab_and_process_param_raw (2);   match_2_chn_data_param (1); 
  match_data_param (1);   me_test_report_ab (1);   optics (5); 
  optics_ref (5);   quant_report_ab (1);   quant_report_refl (1); 
  refl_no_atm_comp_data_param (1);   sample (5);   sc_ref_data_param (5); 
  sc_sample_data_param (5);

{opusreader2}

Plot the data

Code
x <- rev(data[[1]]$ab$wavenumbers)
y <- rev(data[[1]]$ab$data)

# first spectrum in the collection
plot(x = x, y = y, type = "l", xlab = "Wavenumber [1/cm]", ylab = "Absorbance (a.u.)", xlim = range(x), ylim = range(y))

Resources

Spectroscopy research

  • Baumann, P. (2021). Scaling-up Soil Quality Assessments: Efficient Infrared-spectroscopic Workflows across Space and Time [Doctoral Thesis, ETH Zurich]. https://doi.org/10.3929/ethz-b-000549011

  • Baumann, P., Helfenstein, A., Gubler, A., Keller, A., Meuli, R. G., Wächter, D., Lee, J., Viscarra Rossel, R., & Six, J. (2021). Developing the Swiss mid-infrared soil spectral library for local estimation and monitoring. SOIL, 7(2), 525–546. https://doi.org/10.5194/soil-7-525-2021

  • Baumann, P., Lee, J., Behrens, T., Biswas, A., Six, J., McLachlan, G., & Viscarra Rossel, R. A. (2022). Modelling soil water retention and water-holding capacity with visible–near-infrared spectra and machine learning. European Journal of Soil Science, 73(2), e13220. https://doi.org/10.1111/ejss.13220