<figure><img src="image_1.png" /></figure>

HAL
open science

miniRUEDI, a portable mass spectrometer for on-site
gas analysis: a guide for users

Hugo Dutoit, Laurent Truche, Frédéric-Victor Donzé

► To cite this version:

Hugo Dutoit, Laurent Truche, Frédéric-Victor Donzé. miniRUEDI, a portable mass spectrometer for on-site gas analysis: a guide for users. Unpublished, 2025, 10.13140/RG.2.2.12354.70086. hal-05058062

HAL Id: hal-05058062

https://hal.science/hal-05058062v1

Submitted on 6 May 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

Public Domain
# miniRUEDI : A portable mass spectrometer for on-site gas analysis

A guide for users

Hugo Dutoit

Laurent Truche

Frédéric Victor Donzé

Université Grenoble Alpes

Institut des Sciences de la Terre

Contact : hugo.dutoit@univ-grenoble-alpes.fr

Gasometrix was not involved in this production.
<figure><img src="image_2.png" /></figure>
miniRUEDI : A portable mass spectrometer for on-site gas analysis

Copyright © 2025 - Hugo Dutoit, Université Grenoble Alpes.

This guide is an original work based on the independent user experience of the au-
thor. The document was formatted with the open-source LaTeX template IPLeiria
Thesis design. Reproduction is permitted. Gasometrix was not involved in the pro-
duction of this guide. The aim of this guide is to help new users of the *miniRUEDI*
understand its functionality and how to use it. The *miniRUEDI* (Gasometrix, GmbH,
https://gasometrix.com/) was developed—and continues to be developed—at the
Swiss Federal Institute for Aquatic Science and Technology (Eawag) by M. Brennwald,
whose studies and publications have been cited where appropriate. This guide is in-
tended as an independent complement to the documentation manuals provided by the
*miniRUEDI* manufacturer (Gasometrix GmbH).
<figure><img src="image_3.png" /></figure>
# Contents

List of Figures iii

Acronyms iii

## 1 Using the miniRUEDI 1

1.1 Basic principles of a QMS 1

1.2 Basic principles of the miniRUEDI 2

1.3 Starting the miniRUEDI 3

1.4 Setting up the measurement sequence 4

1.4.1 Analysis block 5

1.4.2 Samples block 7

1.4.3 Standards block 8

1.4.4 Deconvolution parameters block 9

1.4.5 Other blocks 12

1.5 Using the GE-MIMS module 15

1.6 Managing the Water Content 15

1.7 Switching off the miniRUEDI 16

## 2 Data Acquisition 19

2.1 Ruedi\_measure 19

2.1.1 Initialization phase 19

2.1.2 Analysis tab 21

2.1.3 Trend tab 23

2.1.4 Scan tab 23

2.1.5 Mass Spectrometer tab 24

2.1.6 Inlets & Sensors tab 26

2.2 Typical Measurement Sequence 27

## 3 Data Processing 29

3.1 Data Extraction with ruedi\_rawextract 29

3.2 Data Processing with ruedi\_process 30

3.3 Data Conversion with ruedi\_convert 33

## References 37
Appendices

A Ionization at 70 eV 40

B Natural abundances 42
List of Figures

<table><tr><td>1.1</td><td>Schematics of the various components of a quadrupole mass spectrometer</td><td>2</td></tr><tr><td>1.2</td><td>Main components of the miniRUEDI</td><td>3</td></tr><tr><td>1.3</td><td>Control panel schematic</td><td>4</td></tr><tr><td>1.4</td><td>GE-MIMS module schematic</td><td>16</td></tr><tr><td>2.1</td><td>Typical warmup signal</td><td>20</td></tr><tr><td>2.2</td><td>Peak tuning procedure</td><td>21</td></tr><tr><td>2.3</td><td>Analysis Tab</td><td>22</td></tr><tr><td>2.4</td><td>Trend Tab</td><td>23</td></tr><tr><td>2.5</td><td>Scan Tab</td><td>24</td></tr><tr><td>2.6</td><td>Mass Spectrometer Tab</td><td>25</td></tr><tr><td>2.7</td><td>Inlets & Sensors Tab</td><td>27</td></tr></table>
<figure><img src="image_4.png" /></figure>
1

Using the *miniRUEDI*

This section provides a general overview of how to use the *miniRUEDI* without ex-
cessive detail. It covers how to start the device, configure its measurement sequence,
and switch it off. Alongside the step-by-step instructions, explanations and tips are in-
cluded. The chapter begins with a brief reminder of the basic principles of a Quadrupole
Mass Spectrometer (QMS); however, it is recommended to consult relevant publica-
tions for a more in-depth understanding.

1.1 Basic principles of a QMS

Mass spectrometry is an analytical technique used to measure the mass-to-charge ra-
tio of ions. In a typical MS procedure, a sample—whether solid, liquid, or gaseous—
is ionized. This ionization may cause some of the sample’s molecules to break into
positively charged fragments or simply become positively charged without fragmenta-
tion. The resulting ions are then selected, separated based on their mass-to-charge ratio
(m/z), and captured by a detector. Various ionization methods exist, each with advan-
tages and disadvantages depending on the application. In the case of the *miniRUEDI*,
ionization occurs through Electron Ionization (EI), formerly known as electron im-
pact ionization. This method produces a high degree of fragmentation, resulting in
highly detailed mass spectra. Electron ionization works by using energetic electrons
to interact with solid- or gas-phase atoms or molecules, generating ions. In a QMS,
the quadrupole serves as the mass analyzer—the component responsible for selecting
sample ions based on their m/z. This mass analyzer consists of four parallel cylindrical
rods. Each opposing rod pair is electrically connected, with a radio frequency voltage
and a DC offset voltage applied between the pairs. Ions travel through the quadrupole
between the rods. For a given voltage ratio, only ions with a specific m/z reach the de-
tector, while others follow unstable trajectories and collide with the rods. This allows
for the selection of a specific ion or scanning across a range of m/z values by contin-
uously adjusting the applied voltage. The ions are detected by a mechanism capable
of detecting charged particles. The results are presented as a mass spectrum, a plot of intensity as a function of the m/z ratio.

<figure><img src="image_5.png" /><figcaption>**Figure 1.1:** a) Ionization chamber, b) Quadrupole filter, c) Faraday cup and electron multiplier, and d) ionization of the dioxygen molecule.</figcaption></figure>

## 1.2 Basic principles of the miniRUEDI

The computer-controlled valve (SV) regulates gas inflow from multiple sources at approximately atmospheric pressure. The capillary (C) then controls the flow of gas from the inlet into the vacuum system. Once inside, the continuous gas stream is directed into the quadrupole mass spectrometer (QMS), where a turbomolecular pump (TP) maintains the high vacuum necessary for operation (Figure 1.2). The ion beam is then filtered through a quadrupole mass filter and subsequently measured using either a Faraday cup (F) or a secondary electron Multiplier (M) detector. To achieve the necessary pressure reduction from atmospheric levels to high vacuum, the sample gas travels through a 10-meter-long stainless-steel capillary with an inner diameter of 0.1 mm. This 1/16" tubing effectively prevents mobile gases from escaping through its walls. The gas flow rate through the capillary is approximately 0.06 $cm^3$ STP/min, which results in a total pressure of about $2 \times 10^{-8}$ bar within the mass spectrometer's vacuum chamber. The transit time of the gas from the capillary inlet to the QMS is approximately 80 seconds. A sudden step-like change in concentration at the inlet becomes diffused over roughly 10 seconds by the time it reaches the QMS, leading to an analytical time resolution of under one minute. Compared to other mass spectrometer systems, the miniRuedi operates with remarkably low gas consumption, requiring just 0.1 ml/min or less. The system does not rely on any gas purification or sample
preparation units, making it robust and maintenance-free, thus enabling autonomous
long-term operation in the field. The instrument is portable (60 cm × 40 cm × 14 cm, 13
kg) and consumes just 50 W of electrical power, allowing for straightforward deploy-
ment and operation in remote locations using batteries, solar panels, or other off-grid
power sources. Please refer to Brennwald et al., 2016 for more information.

<figure><img src="image_6.png" /><figcaption>**Figure 1.2:** Schematic (a) and photo (b) of the miniRuedi. 6-port inlet Selector Valve (SV), Capillary (C), Inlet Valve (IV), Quadrupole Mass Spectrometer (QMS), Turbomolecular Pump (TP), Diaphragm Pump (DP), Control panel (CP), modified from Brennwald et al., 2016. Diagram of mass spectrometer components (c) from RGA200 manual, Standford Research Systems, Inc. (2009).</figcaption></figure>

**1.3 Starting the *miniRUEDI***

To start the *miniRUEDI* it is important to follow the following steps to avoid damaging
the filament. Please refer to Figure 1.2 before starting and pay attention to warnings.

1. Check that the black valve on the Turbomolecular Pump (TP) is closed.

2. Plug the *miniRUEDI* into a power source (mains socket or 24 V battery).

3. On the Control panel (CP) switch on the Diaphragm Pump (DP) and wait a minute, **THEN** switch on the Turbomolecular Pump (TP) and **THEN** the 6-port
inlet Selector Valve (SV), see the order on Figure 1.3.

4. If the green LED on the turbomolecular pump is stable, open the green Swagelok Inlet Valve (IV), there is a notch to pass.

5. Switch on the computer (id : ruedi / password : ruedi) and connect it to the miniRUEDI using the black USB cable. Switch on the mass spectrometer.

6. Open the .txt configuration file /home/ruedi_measure_config.txt.

Warning

The turbomolecular pump LED flashes green when switched on. DO NOT switch on the mass spectrometer before the green signal is stable (meaning that the secondary vacuum is sufficient).

<figure><img src="image_7.png" /><figcaption>**Figure 1.3:** Schematic of the miniRUEDI control panel. The numbers indicate the order of activation.</figcaption></figure>

1.4 Setting up the measurement sequence

The miniRUEDI is controlled using the ruediPy software package https://github.com/brennmat/ruediPy, which provides all the necessary functions to operate the ruedi_measure, ruedi_rawextract, ruedi_process, and ruedi_convert software suites. The configuration file ruedi_measure_config.txt defines the required parameters and ensures the proper operation of ruediMeasure. Although much of the configuration is
done via the software's graphical interface, a few points have to be entered manually
in the ruediwickrmeure_config.txt file.

The configuration file is divided into the following blocks: i) Analysis block, ii) Sam-
ples block, iii) Standards block and iv) Deconvolution parameters block.

1.4.1 Analysis block

This block (Listing 1.1) allows to choose the m/z ratios to be measured (i.e. the species
to be analyzed) and the detector(s) to be used. It is also in this block that the acquisition
time for each measurement (gate time) can be determined, as well as the number of
cycles per measurement (which will have an impact on the statistics and therefore the
quality of the measurements) and to ensure detector stability. The last parameter is
the ionization energy.

1
###### ANLYSIS BLOCK 1
2
# number of F conditioning cycles (to make sure detector is stable):
3
num_F_cond = 2
4

5
# m/z ratios for F PEAK readings and offsets for ZERO readings in each cycle:
6
mz_F = ((15,-4) , (28,-3) , (32,+5) , (40,-3) , (44,3))
7

8
# gate time (seconds) for each F reading:
9
gate_F = 1
10

11
# number of repeated F cycles:
12
num_F = 5
13

14
# m/z ratios for M PEAK readings and offsets for ZERO readings in each cycle:
15
mz_M = ((4,1), (84,+4))
16

17
# gate time (seconds) for each M reading:
18
gate_M = 2.4
19

20
# number of repeated M cycles:
21
num_M = 5
22

23
# EE parameter of the MS ion source (ionisation energy in eV):
24
ee = 70
25

26

<caption>Listing 1.1: Analysis block.</caption>
In the above example, `num_F_cond` and `num_M_cond` are used to define the number of cycles to be made in order to test the stability of the F and M detectors. The higher the value, the more the stability of the detector is ensured. However, it doesn't have to be very high, as the miniRUEDI warm-up phase already ensures a certain stability of measurements (see Section 2.1.1).

The next step is to specify the m/z ratios to be analyzed and select the appropriate detector for measurement. This is achieved using the `mz_F` and `mz_M` lines, where `mz_F` corresponds to the F detector and `mz_M` to the M detector. The input must be structured as follows:

$$ \text{mz\_F} = ((\text{m/z\_1}, \text{offset\_1}), (\text{m/z\_2}, \text{offset\_2}), \dots, (\text{m/z\_n}, \text{offset\_n})) $$

Selecting the appropriate detector is crucial, as the Faraday cup (F) is optimal for concentrations above 0.1%, while the secondary electron Multiplier (M) is best suited for concentrations below this threshold. To prevent saturation, avoid overloading the M detector whenever possible. The offset represents a positive or negative shift on the m/z axis relative to the zero reading. Therefore, it is essential to ensure that m/z ± offset does not coincide with a peak or a neighboring peak.

**Tip**

To ensure the correct selection of both the detector and offset, it is highly recommended to perform a scan before configuring the measurement sequence. This step also provides insight into the species present in the sample. Refer to Section 2.1.4 for further details and visit the NIST chemistry webBook if needed: https://webbook.nist.gov/chemistry/name-ser/.

The final two parameters are crucial, as they directly impact the accuracy of the measurements. Increasing the duration of `gate_F` or `gate_M` improves measurement precision; however, keep in mind that this also extends the overall measurement time, which can be a concern for long-term monitoring. In general, using a longer gate time is more beneficial for low concentrations (measured with the M detector) than for high concentrations. Each measurement represents the mean value of multiple measurement cycles, as defined by `num_F` and `num_M`. A higher number of cycles enhances statistical reliability, leading to more accurate results. However, similar to gate time, increasing the number of cycles also prolongs the measurement duration.

**Note**

There's no need to exceed 2.4 second of gate time and it is recommended to keep the number of cycle ≥5.

The ionization energy can be adjusted directly through the graphical interface of `ruedi sukure`.
However, it is recommended to maintain it at 70 eV for all measurements (see Section 2.1.5).

### Tip

In some cases, adjusting the ionization energy can be advantageous. For instance, reducing the ionization energy to 45 eV can help eliminate interference at mass 20 between $^{40}$Ar++ and $^{20}$Ne, as $^{40}$Ar does not ionize twice at this energy level (see Table A.1). However, lowering the ionization energy reduces measurement accuracy.

## 1.4.2 Samples block

This block (Listing 1.2) allows to select the inlet port to which the sample is connected (inlet numbers are marked on capillaries) and specify the number of repetitions of the measurement sequence. When using the GE-MIMS module (see Section 1.5), this block also enables to define the type of temperature and pressure sensors, assign their respective serial ports, and set their labels. Additionally, the number of data points displayed on the pressure plot during measurements can be configured.

```python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
```
30
31 # Number of data points in P sensor buffer (max.):
32 ### optional: Pelliger_pmax = 100

<caption>Listing 1.2: Sample block.</caption>

Note

The parameters related to the GE-MIMS module should remain unchanged, except for
the labels and the number of data points. If the GE-MIMS module is not in use, simply
comment out the corresponding lines by prefixing them with a "#" sign.

A sample block always begins with [SAMPLE name], where "name" represents the sam-
ple label. This label can be customized either in the configuration file or through the
ruedi sukure graphical interface. If multiple samples need to be measured across
different inlets, simply add additional sample blocks. For each block, specify the cor-
responding inlet and define the number of sequence repetitions. However, it is crucial
to start each new block with [SAMPLE name_2] while always retaining the SAMPLE pre-
fix.

Repeating a measurement sequence multiple times allows to monitor variations in sam-
ple concentration or simply ensure stable concentration readings. This parameter can
be adjusted directly through the ruedi\_measure graphical interface, where it is possi-
ble to repeat the sequence continuously. Sequences can be stopped at any time through
the graphical interface.

Warning

Capillaries are intended to be of the same length. When this is not the case, they can
return slightly different intensities, which makes it challenging to compare samples mea-
sured on different capillaries. This is especially important when measuring the standard.
It is possible to check the intensities returned by each capillary via the graphical interface
(see Section 2.1.6).

1.4.3 Standards block

This block (Listing 1.3) allows to select the inlet port to which the standard is connected
and to indicate its composition. The choice of standard(s) is crucial, as it allows intensi-
ties to be converted into concentrations. It is therefore necessary to have a standard for
each species measured. The detailed process of calibration with the *miniRUEDI* is de-
scribed in Section 3.2, yet it is important to keep in mind that the closer the standard(s)
is to the concentration of the species in the sample, the better the quantification will be.

<footnote n="1">1
## STANDARDS</footnote>

<footnote n="2">2
*** STANDARDS ***</footnote>
3
4
5 [STANDARD AIR]
6
7 # Inlet port:
8 inlet = 6
9
10 # Gas species: concentrations and m/z values:
11 gas = ( ('He-4',5.24E-6,4) , ('N2',0.781,28) , ('O2',0.2095,32) ,
        ('Ar-40',0.009263,40) , ('Kr-84',6.27E-7,84) )

<caption>Listing 1.3: Standard block.</caption>

The input to specify the standard composition must be structured as follows :

gas = ( ('species_1 name', concentration (bar),m/z_1),
        ('species_2 name', concentration (bar),m/z_2), ...,
        ('species_n name', concentration (bar),m/z_n))

When known, the abundance of an isotope must be taken into account when indicating
the concentration in gas. For example, ambient air contains 0.93 vol% argon, 99.6% of
which is $ ^{40}\text{Ar} $, so the concentration of $ ^{40}\text{Ar} $ in the air is 0.9263 vol% (see Table B.1).

Tip

After the processing results are given in hPa. A concentration of 20 vol% = 0.20 bar = 200 hPa (as long as the inlet pressure is 1 bar).

A standard block always begins with [STANDARD name], where name represents the
standard label. This label can only be customized in the configuration file. If multiple
standards need to be measured across different inlets, simply add additional standard
blocks. For each block, specify the corresponding inlet and define the compositions.
However, it is crucial to start each new block with [STANDARD name_2] while always
retaining the STANDARD prefix.

Note

The measurement sequence for SAMPLES, STANDARDS, and BLANKS is always the same.
If the different standards contain different species, during the standard measurement se-
quence, all the peaks specified in the mz_F and mz_M lists will be measured. However,
during data processing, the appropriate standard will be used for each species measured
in the sample. Therefore, be aware that using multiple standards can significantly in-
crease the measurement time.

**1.4.4 Deconvolution parameters block**

As a species ionizes, it generates multiple peaks at different m/z ratios. As a result, two
or more species can share the same m/z ratio, a phenomenon known as isobaric inter-
ference. Ruedipy incorporates a calculation method for deconvoluting a peak formed by multiple species into a sum of peaks specific to each species, weighted by their respective contributions to the targeted m/z ratio (Brennwald et al., 2020). In cases where isobaric interference is detected, it may be necessary to configure the deconvolution parameters. The example below (Listing 1.4) illustrates a deconvolution of m/z = 15, where the peaks of CH₄, N₂, and air (containing N₂) overlap (because of the ¹⁵N isotop).

```python
 Listing 1.4: Deconvolution parameters block.

The deconvolution needs helper PEAK that are defined by mz_F_deconv whose structure is similar to that of mz_F of the ANALYSIS BLOCK. They correspond to additional m/z ratios that the miniRUEDI will measure. These m/z ratios correspond to the other peaks produced by the species being deconvoluted. However, increasing the number of selected masses also extends the measurement duration and complicates the calculation process.

In the example above, although methane produces peaks at m/z = 16, 15, 14, 13, 12, 2, and 1, only m/z = 14 and 16 are used as helper peaks, as they correspond to its most significant peaks (besides m/z = 15). The signals from m/z = 13, 12, 2, and 1 are much weaker, meaning that achieving a reliable measurement at these masses would require
```
significantly longer acquisition times (and/or using M detector). It is also essential to choose helper peaks that do not interfere—or interfere only minimally—with species other than those included in the deconvolution. For instance, in the presence of CO₂, m/z = 12 will also contain a contribution from carbon due to CO₂ ionization. Including m/z = 12 as a helper peak would require adding CO₂ into the calculation matrix, increasing both acquisition and computation time.

This step highlights the importance of thoroughly understanding the mass spectra of the species involved.

**Tip**

NIST chemistry webBook: https://webbook.nist.gov/chemistry/name-ser/can help to familiarize with the different peaks produced by ionization.

The species to be deconvoluted is defined by two parameters: `target_mz_deconv` that ask for the m/z ratio of the targeted species and `target Species deconv` that ask for its label, while the detector to be used is specified by `detector_deconv` (F or M).

**Warning**

For deconvolution, it is important to use only the same detector (M or F) to measure the helper peaks and the target m/z ratio.

**Note**

For `target Species deconv` use the same species label as in the standard block.

The deconvolution method requires to know the ratio of the maximum peak intensities for each pure species used in the calculation :

basis_deconv = (('species name', m/z_1, ratio of intensity_1, m/z_2, ratio of intensity_2, m/z_3, ratio of intensity_3), ...)

For the deconvolution of CH₄, N₂, and air, it is first necessary to measure pure methane, normalize its main peak to 1, and then normalize the other peaks relative to this main peak. In the example above, the main peak of CH₄, set to a ratio of 1, corresponds to m/z = 16. The peak at m/z = 15 has an intensity of 80.9% relative to the main peak, while the peak at m/z = 14 has an intensity of 12.4% relative to the main peak. The same procedure must be applied to the spectra of N₂ and air.

**Tip**

It is not necessary to use pure gas, as long as the gas mixture used does not produce any interferences between the species.

Once again, only the basis spectra relevant the deconvolution need to be measured. In this case, these include the target peak (m/z = 15), the helper peaks (m/z = 14 and
16), and, if necessary, the key peaks of these species—such as m/z = 28 for N₂ and air, and m/z = 32 for air.

### To-Do

The ratios of the different peaks are specific to each machine and should be remeasured periodically to ensure accuracy.

The deconvolution is then performed automatically by the `ruedi_process` software. The console displays the percentage contribution of the target species to the selected m/z ratio. The concentration value for the selected m/z ratio, as presented in the output table of `ruedi_process`, corresponds to the result of the deconvolution. In the previous example, the output table will indicate the partial pressure of methane at m/z = 15, excluding contributions from N₂ and air.

### Note

See Section 1.4.1 for conditioning cycles, gate time and num_F.

## 1.4.5 Other blocks

The configuration file contains additional parameters, some of which should remain unchanged, while others can be adjusted directly through the graphical interface of `ruediwick`.

### General Parameters

```
1
[GENERAL]

2
# Time to purge capillary after switching inlet port (seconds):
3
capillary_purge_seconds = 140

4

5
# Number of samples between automatic standard runs:
6
num Samples per standard = 5

7
```

<caption>**Listing 1.5: General parameters.**</caption>

The 140-second capillary purge time should never be reduced but can be increased to prevent any memory effects from previous measurements.

The number of samples between standard measurements can be adjusted directly in the graphical interface of `ruediwick`. Each sample measurement sequence must
include at least one standard measurement before and one after the sequence. However, for long or continuous sequences, the interval between standard measurements should not exceed 2 hours, as regular standard measurements help monitor and correct potential instrument drift.

Blank block

1
##########

2
### BLANK ###

3
##########

4

5
[BLANK]

6

7
# Time to evacuate the system before starting blank analysis (seconds):

8
evacuation_seconds = 80

<caption>Listing 1.6: Blank block.</caption>

Blanks are essential for accurately quantifying the concentrations of measured species, as the baseline is never truly zero. Additionally, at least two blank measurements per sequence are required to estimate the error on each measurement (see Section 3.2). The evacuation time is set to 80 seconds, based on the gas transit time from the capillary inlet to the QMS, and represents a minimum.

Mass Spectrometer parameters and M/Z tuning

1
###########

2
### MASS SPECTROMETER (RGA) ###

3
###########

4

5
[MS]

6

7
# MS/instrument label:

8
label = pingRUEDI

9

10
# MS type:

11
type = rgams_SRS

12

13
# Serial port of the MS:

14
serialport = /dev/serial/by-id/usb-WuT_USB_Cable_2_WT2374641-if00-port0

15

16
# Default electron energy as configured at startup (EE parameter in eV, optional):

17
EE = 70

18

19
# Default parameters for m/z scale:

20
RI = -8.5

21
RS = 1072.3

22
DI = 118

23
DS = 0.0
```
mz_high_F = 35

# Gate time for M compensation (use same value as for analysis runs, or gate=0 to skip
  → M compensation):
gate_M = 2.4

# m/z start value for M scan:
mz_low_M = 21

# m/z stop value for M scan:
mz_high_M = 24

# Plot quick scans:
do plot = True
```

<caption>Listing 1.8: M/Z scale tuning and quick scan parameters.</caption>

The MZ tuning block is provided for informational purposes, but none of the parameters should be modified, especially the peaks used for tuning (`mz gate det`). All the relevant quick scan parameters can be adjusted directly through the graphical interface of `ruediMeasure`, so there is no need to modify them in the configuration file.

**Note**

All the parameters in the configuration file not mentioned in this first section should not be modified.

## 1.5 Using the GE-MIMS module

The GE_MIMS degassing module allows for in situ measurement of dissolved gases. Its operation is summarized in Figure 1.4. The capillary is connected to the degassing outlet of the GE_MIMS. Data acquisition is performed in the same way as for measuring free gases; however, data processing requires using the `ruedi_convert` software to convert concentrations into dissolved concentrations (see Section 3.3). Remember to configure the pressure and temperature sensors in the `ruediwick` configuration file.

## 1.6 Managing the Water Content

Liquid water must never enter the system. Water in vapor form is present everywhere and thus enters the spectrometer; however, every effort should be made to minimize its presence. Water tends to remain in the system, so it may be useful to regularly monitor m/z = 18 ($H_2O^+$) on the Faraday cup and m/z = 17 ($OH^+$) on the electron multiplier with the valve closed, to ensure no water is present (see Section 2.1.3). A dry miniRUEDI, with the valve closed, typically shows an intensity around $10^{-13}$ to $10^{-14}$ for mass 18 and $10^{-9}$ to $10^{-10}$ for mass 17. If water is present, it may be necessary to run the pumps for one or more days in a warm environment to remove it (usually,
<figure><img src="image_8.png" /><figcaption>**Figure 1.4:** Schematic of the GE-MIMS control module. The temperature sensor must point downwards to prevent gas bubbles from getting trapped between the water flow and the sensor.</figcaption></figure>

closing the *miniRUEDI* box while it is running is sufficient to keep the instrument in a
warm environment).

1.7 Switching off the *miniRUEDI*

1. In the *Mass Spectrometer* tab of `ruedi_measure` (see Section 2.1.5), click on `On` in the `Filament` row to turn off the filament of the spectrometer.

2. Close `ruedi_measure`.

3. On the Control panel (CP), turn off the mass spectrometer, **THEN** the 6-port inlet Selector Valve (SV), **THEN** the Turbomolecular Pump (TP) and finally the Diaphragm Pump (DP), following the reverse order of startup.

4. Close the *Swagelock* Inlet Valve (IV) and disconnect the sample.

5. Slightly open the black valve of the turbomolecular pump to allow air to enter and return the pump to atmospheric pressure. Be careful not to introduce dust or water. Do not open the valve too quickly to avoid causing the pump to slow down too rapidly and potentially damage it. It is advisable to open the valve gradually.

6. Once the TP has stopped, disconnect the *miniRUEDI* from its power supply. Close the box, making sure not to pinch any capillaries.
Tip

It is recommended to avoid frequent power cycling in order to maintain stable analytical performance. For periods of a few hours or less, it is preferable to keep the device on. The miniRUEDI can remain on for several days without any issues. For longer shutdown periods or for transport, the device should be turned off.
<figure><img src="image_9.png" /></figure>
This section provides a detailed explanation of how to use the ruedi\_measure software for data acquisition. It covers the various functionalities of the graphical interface, offering step-by-step instructions along with explanations and useful tips.

## 2.1 Ruedi\_measure

### 2.1.1 Initialization phase

When the ruedi\_measure software is launched for the first time, a console window opens. If there is an error in the configuration, an error message will be displayed. In this case, review the error message and update the `.txt` configuration file accordingly. If the configuration is correct, the graphical interface will open, and a prompt will appear asking for a warmup. Performing a warmup is always necessary, as it ensures the stability of measurements. However, it is not required before every measurement—only when the *miniRUEDI* has been powered off between acquisitions. By default, the warmup runs on capillary n°6, measuring $N_2$ from ambient air (m/z = 28), whose concentration remains relatively stable. Before clicking on *Run*, ensure that the capillary cap is removed and that the *Swagelok* valve (IV) is open. Once the warmup has started, wait for the signal curve to stabilize, which typically takes around 10 to 15 minutes. The measurement is considered stable when the curve levels out, as shown in Figure 2.1.

Once the signal is stable, stop the warmup and wait for peak tuning to finish (≈ 2 minutes), as shown in Figure 2.2. During this process, the program automatically adjusts the mass filter, ensuring that peaks are correctly aligned with their respective m/z values as follows:

1. Checks that the input peaks list contains at least two distinct peak m/z values, one at a low and one at a high m/z value (mz\_gate\_det in Listing 1.8).

2. The intensity of each peak is scanned at the specified m/z ratios using the default
<figure><img src="image_10.png" /><figcaption>**Figure 2.1:** Screenshot of a typical Faraday signal trend at m/z = 28 during warmup.</figcaption></figure>

RI (Ramp Intercept) and RS (Ramp slope) parameters (Listing 1.7). RI and RS control how the spectrometer maps raw data to m/z values.

3. A straight-line fit is used to remove baseline noise from the measured intensities and the baseline is removed from the fit.

4. Peak centers are determined using the cumulative sum method (computes the cumulative sum of peak intensity, normalizes it and finds the m/z value where cumulative intensity reaches 50% of the total peak intensity), and the mass-weighted center method (computes the average m/z value of points where intensity is ≥80% of the peak maximum). See Figure 2.2.

5. The two determined peak centers are compared. If they differ by more than 0.35 m/z the peak is discarded. Otherwise, a weighted average (3:1 ratio in favor of peak top) is taken.

6. After scanning all the peaks, offset errors at m/z = 0 (`delta_m0`) and m/z = 128 (`delta_m128`) are estimated based on a linear function `delta_m` vs m/z (where `delta_m` is the difference between the targeted m/z and the determined peak center). These two offsets represent how much the peaks at low and high m/z deviate from expected positions.

7. If `delta_m0` and `delta_m128` are within ±0.05 m/z (default value that can be modified if needed by defining `maxdelta_mz` in Listing 1.7) the tuning is considered successful. If not RI is adjusted based on `delta_m0` and RS, and RS is adjusted proportionally to the mass shift at m/z = 128 and a new iteration of the algorithm begins.

8. When the tuning is done the new RI and RS parameters are displayed in the GUI console.

The interface is now accessible.
<figure><img src="image_11.png" /><figcaption>**Figure 2.2:** Screenshot of automatic peak tuning procedure. The black line shows a scan of the peak centered at m/z = 44. The red line is the cumulative sum of the values in the peak scan. Both lines are used in the peak centering algorithm.</figcaption></figure>

## 2.1.2 Analysis tab

In the Sample Sequence section (Figure 2.3), the label and the number of repetitions (i.e. how many times the sample will be measured) can be modified. Often, the measurement is not immediately stable, so it is recommended to perform at least 5 repetitions—or more if the signal remains unstable. The Repeat sequence continuously option is particularly useful in such cases. It allows tracking the evolution of sample concentration over time, such as in long-term monitoring scenarios.

The Standards and Blanks section (Figure 2.3) is crucial, as it allows to define when to perform standard or blank measurements. For high repetition counts or continuous measurements, it is possible to schedule an automatic standard measurement after every x sample measurements (see Section 1.4.5). Regardless of the measurement type (continuous or punctual), it is **strongly recommended** to always run a standard both before and after the sample measurement sequence. This can be done by selecting the options Run standard before starting the sequence and Run standard after starting the sequence.

**Warning**

Do not check the option Include blank when running standard, as the valve closing is not automatic.

Similarly, it is **highly recommended** to perform a blank measurement by clicking Run blank before starting any measurement (standards or samples) and again at the very end of the measurement sequence. When clicking this option, a message asks to close the green Swagelok valve (IV). Close the valve and confirm by clicking OK. After purging the capillary (see Listing 1.6), the blank measurement is taken for all species defined in the Analysis Blocks (Listing 1.1).
**Note**

Before running the sample sequence, ensure to reopen the Swagelok valve (IV) and that the inlet indicated in the Sample Sequence section corresponds to the inlet to which the sample is connected.

<figure><img src="image_12.png" /><figcaption>**Figure 2.3: Analysis tab of ruedi*m_*measure*.</figcaption></figure>

**Tip**

A minimum of two blanks is required for data processing (see Section 3.2). If the detector(s) has been saturated, a memory effect may cause elevated blank concentrations, potentially resulting in negative intensities and concentrations after data processing. To prevent this, it is recommended to perform two blank measurements before any sample measurement, ensuring that at least two blanks remain unaffected by potential memory effects. The blank measured at the end of the sequence serves as a control for this effect. However, note that negative intensity and concentration values may also result from an inherently low concentration of the measured species. In such cases, checking the raw blank values can help confirm the cause.

Clicking on Run Sample Sequence initiates the measurement of both standard(s) and sample(s). If needed, a single measurement of the standard(s) can be performed separately by clicking on Run Standard. The data are automatically and progressively saved in .txt format within the /home/data directory on the computer. For subsequent data processing, it is recommended to organize the acquired data into a single, clearly named folder at the end of the acquisition process (avoid using spaces in folder
names).

### 2.1.3 Trend tab

The Trend tab (Figure 2.4) allows for a quick measurement of one or more m/z ratios on the desired detector. The measurement is carried out on the selected capillary, which can be chosen via the capillary selection screen in the *miniRUEDI* box or the Inlets & Sensors tab Section 2.1.6. Reducing the Gate Time speeds up the measurement process but increases noise. If the concentration of the measured species is high, the Gate Time can be reduced without significantly affecting sensitivity.

<figure><img src="image_13.png" /><figcaption>**Figure 2.4:** Trend tab of *ruedi\_measure*. CDEM corresponds to the electron multiplier.</figcaption></figure>

**Warning**

When a trend is initiated, the capillary is not purged meaning that it is necessary to wait 1 to 2 minutes before observing a stable signal corresponding to the measured sample.

This tool is particularly useful in two situations: i) to ensure that the sample gas reaches the detector and the measurement stabilizes, and ii) when a detector has been saturated at a specific m/z, to monitor the decrease in intensity of that mass before measuring the same ratio for another sample. This is also useful for monitoring water content in the mass spectrometer (see Section 1.6).

### 2.1.4 Scan tab

The Scan tab (Figure 2.5) allows to perform a quick scan between a Start m/z and an End m/z for a given detector. The Points per amu and Speed options are used to
adjust acquisition time and, therefore, measurement sensitivity.

**Tip**

It is recommended to keep the number of Points per amu at 25 and to adjust only the Speed according to the concentration of the species and the quality of the scans obtained.

<figure><img src="image_14.png" /><figcaption>**Figure 2.5:** *Scan tab of ruedi_measure.*</figcaption></figure>

Scans are extremely important and should always be carried out prior to any measurements, as they enable identification of the species present in the sample and determination of the m/z ratios to be measured, as well as the detectors to be used for each of them. Scanning is also necessary to determine the m/z values that can be used for zero-reading (see Section 1.4.1).

**Note**

Clicking on *Scan* returns an intensity vs m/z spectrum but no data table. However, a *MISC.txt* file is automatically generated and saved in the `/home/data` directory, where it remains accessible for retrieving the intensity values measured during the scan.

### 2.1.5 Mass Spectrometer tab

The Mass Spectrometer tab (Figure 2.6) is divided into two sections. The MS settings section that allows to interact with the spectrometer, and the Data plots section that allows to modify certain parameters of the plot displayed during measurement sequences. In the first section, it is possible to switch off the filament (see Section 1.7),
run peak tuning again (see Section 2.1.1), and modify the ionization energy (see Section 1.4.1).

**Tip**

High temperatures can affect the quality of measurements. In this case, it may be worth-while to redo a peak tuning by clicking on Tune.

The default ionization energy is 70 eV. Increasing it provides greater sensitivity for large masses, but increases the number of species formed by ionization and therefore potentially the number of interferences. Decreasing the ionization energy reduces the number of ionized species and therefore potentially the number of interferences, but results in lower sensitivity (see the last tip of Section 1.4.1 for an example). It is recommended to maintain it at 70 eV.

<figure><img src="image_15.png" /><figcaption>**Figure 2.6: Mass Spectrometer tab of ruedi\_measure.**</figcaption></figure>

The MS status function provides a detailed status report of the mass spectrometer system. It collects and prints information about the mass spectrometer's settings, tuning informations, detector status, electron energy, emission current, and any potential errors related to different components of the system:

1. MS max m/z range corresponds to the maximum m/z range for the mass spectrometer.

2. Ionizer electron energy corresponds to the electron energy of the ionizer.

3. Electron emission current tends towards 0 mA as the filament deteriorates, and is therefore important to check regularly.

4. The default bias voltage of the electron multiplier (M) is initially set at 1400
V, but tends to decrease over time. When this becomes too important, its value
can be readjusted (CDEM bias (Volt) in Listing 1.7).

5. The current tuning settings RI, RS, DI and DS define the shift, stretch and width applied to the peaks (see Section 2.1.1).

The different error statuses that can be displayed are the following:

1. RS232 Communication Error reports any communication issues with the Residual Gas Analyzer (RGA).

2. Filament Error reports any issues with the filament (e.g., no filament detected, emission current issues), which may indicate filament breakage.

3. Electron Multiplier Error reports issues with the electron multiplier (e.g., no electron multiplier installed).

4. Quadrupole Filter Error reports problems with the quadrupole filter (e.g., current limits, power supply issues).

5. Electrometer Error reports electrometer-related problems, such as issues with input current or ADC failures.

6. External Power Supply Error any external PSU voltage issues (e.g., external 24V power supply voltage is outside of the allowed range).

In the second section, the Peak buffer y-scale and Scan y-scale options switch be-
tween linear and logarithmic ordinate scales for the top and bottom graphs respec-
tively. Plots windows opens and closes the graphics window and Peak buffer clears
the top chart.

Tip

In the case of the linear y-scale, all measurement points are normalized to the first mea-
surement point, typically the standard, if measured at the beginning of the sample se-
quence. This can be useful for direct comparisons between samples and standards. The
logarithmic scale, on the other hand, is more visual, as it shows directly the measured
intensity.

2.1.6 Inlets & Sensors tab

This tab (Figure 2.7) allows to switch capillaries via the Valve position option and
initiate a comparison test by clicking on Run test. This test performs a series of mea-
surements in ambient air (ensure that each capillary is exposed to ambient air) on each
capillary. It is important that all 6 capillaries have the same length and return similar
intensities. If this is not the case, one of the capillaries may be clogged, damaged, or of
a different length than the others. In the last cases, a manual correction can be applied
after data processing by comparing the intensities between the shorter capillary and
the correctly sized one.
<figure><img src="image_16.png" /><figcaption>**Figure 2.7: Inlets & Sensors tab of ruedi_measure.**</figcaption></figure>

### Warning

The capillary test lasts approximately 30 minutes.

## 2.2 Typical Measurement Sequence

Here is an example of a typical measurement sequence:

1. Perform a quick measurement (Trend) of the sample(s) for at least 2 minutes to ensure that it fills the capillary(ies) and reach the mass spectrometer. Generally, measuring the m/z = 32 (O₂) ratio for a few minutes until it decreases to a stable level is a good indicator. This also helps ensure minimal air contamination.

2. Scan of the sample(s) from m/z = 1 to m/z = 90 using the Faraday cup (F) to identify the species present and the m/z ratios that can be used for zero-reading. Perform scans with the electron multiplier (M) for m/z ratios that show no peaks with the Faraday cup.

3. Configure the m/z ratios to be measured, the zero-reading values and the standards (see Section 1.4).

4. Set up the sample sequence in ruedi_measure.

5. Blank measurement.

6. Blank measurement (bis).

7. Standard(s) measurement.

8. Sample(s) measurement. It is recommended to perform 5 repetitions by default,
and adjust this number based on the stability of the measurements. Repeat standard (s) measurements if needed.

9. Standard(s) measurement.

10. Blank measurement to check for a potential memory effect. This blank may therefore not be necessary for the final data processing.

**Note**

The first two blanks (steps 5 and 6) can also be performed at the beginning (before *Trend* and *Scans*) to ensure their good measurement.
This section provides a detailed explanation of how to use *ruedi_rawextract*, *ruedi_process* and *ruedi_convert* softwares for data processing. It covers their operation, sometimes with a lot of details, offering step-by-step instructions along with explanations and useful tips.

## 3.1 Data Extraction with ruedi_rawextract

The *ruedi_rawextract* software allows for the retrieval of raw intensity data for the measured m/z ratios. It extracts raw data from `.txt` data files (peak heights, sensor data, etc.) and writes results to `.csv` data file (Table 3.1) with `';'` as column delimiters. When *ruedi_rawextract* is opened, it prompts the user to select the folder containing the `.txt` raw data files. This is why it is essential to group all measurement files (blanks, standards, and samples) into a single folder. Once the `.csv` data file is generated, *ruedi_rawextract* prompts the user to choose the destination folder for the resulting file. The software can then be closed by pressing any key.

<table><caption>**Table 3.1:** Description of the raw datafile. UNIX time corresponds to seconds after Jan 01 1970 UTC.</caption><thead><tr><td>Column</td><td>Description</td></tr></thead><tbody><tr><td>FILE</td><td>yyyy-mm-dd_hh-mm-ss_TYPE.txt</td></tr><tr><td>TYPE</td><td>Can be STANDARD, BLANK or SAMPLE</td></tr><tr><td>SAMPLE</td><td>Sample label (yyyy-mm-dd hh:mm:ss)</td></tr><tr><td>m/z Marginal (EPOCH)</td><td>Detector can be F or M, time of measurement (UNIX time).</td></tr><tr><td>m/z detector (MEAN)</td><td>Mean intensity value (amp)</td></tr><tr><td>m/z detector (MEAN-ERR)</td><td>Mean intensity error value (amp)</td></tr></tbody></table>
Note

Uncertainties associated with intensity measurements are estimated by considering several factors inherent to the measuring instruments, such as electronic background noise and fluctuations in the ion source.

## 3.2 Data Processing with ruedi_process

The `ruedi_process` software converts raw intensity data into partial pressures. It calibrates a batch of analysis steps by combining data from samples, calibrations, and blanks, and writes the results to a `.CSV` file (Table 3.2) with ';' as column delimiters. When `ruedi_process` is launched, it prompts the user to select the folder containing the `.txt` raw data files. This is why it is essential to group all measurement files (blanks, standards, and samples) into a single folder. For the processing, the total gas pressure of the standards in hPa must be specified (typically atmospheric pressure, ranging between 996 and 1013 hPa). Once the `.CSV` data file is generated, `ruedi_process` prompts the user to choose the destination folder for the resulting file. The software can then be closed by pressing any key.

<table><caption>Table 3.2: Description of the processed datafile.</caption><thead><tr><td>Column</td><td>Description</td></tr></thead><tbody><tr><td>SAMPLE</td><td>Sample label (yyyy-mm-dd hh:mm:ss)</td></tr><tr><td>SPECIES (m/z_detected) TIME (EPOCH)</td><td>Detector can be F or M, time of measurement (UNIX time).</td></tr><tr><td>SPECIES (m/z_detected) PARTIALPRESSURE (hPa)</td><td>Detector can be F or M, mean partial pressure value (hPa)</td></tr><tr><td>SPECIES (m/z_detected) PARTIALPRESSURE ERR (hPa)</td><td>Detector can be F or M, mean partial pressure error value (hPa)</td></tr></tbody></table>

Understanding the calibration process and conversion of intensities into partial pressures using `ruedi_process` can be important. The calibration technique employed by the *miniRUEDI* is known as *bracketing*. This method involves measuring standards both before and after a sample (and potentially in between, depending on the measurement sequence). These standard measurements are then used to determine the instrument's sensitivity at the time of sample analysis:

1. Loading and digestion of raw data from raw data file (get all the raw data, type of MS, type of detector and type of data STANDARD, BLANK, SAMPLE and store everything in proper array).

2. Sorting of data into three categories: SAMPLE, STANDARD, and BLANK and ensuring that there is at least one SAMPLE, one STANDARD, and one BLANK
entry. If any of these are missing, an error is printed since all three data types are necessary to process the calibration.

3. After the SAMPLE, STANDARD, and BLANK entries are separated, a list of all unique mz/detector combinations is generated (represents the m/z and the detector associated with each measurement).

4. Checking that there are enough data points for STANDARD and BLANK measurements. There must be at least two STANDARD and at least one BLANK data point.

5. Calculating the sensitivity for each mz/detector combination based on the STANDARD data. The sensitivity values provide a relationship between the signal from the mass spectrometer (intensity) and the concentration of species in the sample. For each STANDARD measurement the relevant species and concentration information for each m/z are extracted and the partial pressure of the gas in the standard (PP<sub>std</sub>) is calculated : PP<sub>std</sub> = Total Gas Pressure × Concentration.

6. Sensitivity is then calculated by dividing the blank-corrected standards (mean BLANK value is subtracted to STANDARDs) to their partial pressure :
$$Sensitivity = \frac{Blank corrected STANDARD}{PP_{std}}$$
The error of the sensitivity is similarly calculated by dividing the blank-corrected standard error (SEM<sub>blank</sub> is subtracted to STANDARD<sub>err</sub>) by the partial pressure (see below) :

$$Sensitivity_{err} = \frac{STANDARD_{err}}{PP_{std}}$$

7. The sensitivity of the instrument is not constant over time. Several factors can cause the sensitivity to change (instrumental drift, changes in environmental conditions, aging of the ion source or detector, ...). Since standard measurements are not taken at every single moment but at discrete times, interpolation is used to estimate the sensitivity at times when samples were measured (in this case, linear interpolation is used).

8. Now that sensitivity has been calculated for each mz/detector combination, the intensity of each m/z of the sample is converted to partial pressure :

$$PP_{sample} = \frac{Blank corrected Intensity}{Sensitivity}$$

9. Sensitivity vs time and SAMPLE partial pressure vs time are plotted.

### Note

**Why use sensitivity?** The mass spectrometer's signal intensity is not directly proportional to the concentration or partial pressure of the species. Different species might ionize differently or might have different responses at different m/z ratios. Sensitivity compensates for these differences and allows to convert the raw intensity data into a meaningful physical quantity (partial pressure) that can be compared across different samples and species.

Since instrument sensitivity can drift over time, bracketing ensures that each sample
measurement is corrected using sensitivities derived from the closest available standard measurements, thereby providing a direct correction for instrumental drift.

### Warning

The bracketing method is truly effective when standards are stable and measured frequently. The more often standards are measured, the more reliable and accurate the results will be.

In the same way, it is important to understand how partial pressure errors are calculated:

1. Calculating the uncertainty of the mean blank value for each m/z/detector combination. It corresponds to the standard error of the mean (SEM) of the blank values: $SEM_{blank} = \frac{\sigma_{blank intensity}}{\sqrt{number of blanks-1}}$, with $\sigma_{blank intensity}$ the standard deviation of the blank intensities. At least two blank measurements are needed to avoid division by 0.

2. Propagating blank uncertainty into the standard measurement (total uncertainty of the standard measurement): $\sigma_{standard} = \sqrt{STANDARD_{err}^2 + SEM_{blank}^2}$. The partial pressure error for each m/z in the standard is then calculated using the error of the sensitivity (see above): $PP_{std ERR} = \frac{\sigma_{standard}}{SENSITIVITY_{err}}$

3. Blank uncertainty are propagated the same way to sample measurement.

4. The partial pressure error for each m/z in the sample is then calculated using the error of the sensitivity (see above): $PP_{sample ERR} = \frac{\sigma_{sample}}{SENSITIVITY_{err}}$

### Note

**Why blank is used for error calculation?** Blank account for system noise, instrumental drift, and background interference, which are important sources of error in the measurements.

Based on the above explanations, two conditions must be met to obtain an accurate partial pressure result: i) The viscosity of the gas samples and the standards must be the same and ii) the total pressure of the gas samples must be the same as that of the standards used. If the latter condition is not met, the resulting partial pressures must be corrected using the equation below:

$$p_i^* = p_i \times \frac{p_s}{\sum_j p_j}$$

where $p_i^*$ is the corrected partial pressure of the species $i$, $p_i$ is the initial partial pressure of the species $i$, $p_s$ is the total pressure of the sample (at the inlet of the capillary) and $\sum_j p_j$ is a summation index that must include all species corresponding to the dominant partial pressures in the sample gas.
## 3.3 Data Conversion with ruedi_convert

The ruedi_convert software converts partial pressures of gases into dissolved gas concentrations in water using Henry's Law and writes the results to a .csv file (Table 3.3) with ';' as column delimiters. This program aimed at processing data from GE-MIMS analysis of dissolved water only. When ruedi_convert is launched, it prompts the user to select the folder containing the .csv partial pressure file. Then the program shows a list of the species-m/z-detector items included in the partial pressure file. It is important here to include all the gases that contribute substantially to the total gas pressure (except H₂O partial pressure if measured). Once the .csv data file is generated, ruedi_process prompts the user to choose the destination folder for the resulting file. The software can then be closed by pressing any key.

### Warning

If a gas species was measured at different m/z values or using different detectors, make sure to select only one item corresponding to that species.

<table><caption>**Table 3.3:** Description of the dissolved concentrations datafile. ccSTP/g stands for cubic centimeters at standard temperature and pressure per gram of water.</caption><thead><tr><td>Column</td><td>Description</td></tr></thead><tbody><tr><td>SAMPLE</td><td>Sample label (yyyy-mm-dd hh:mm:ss)</td></tr><tr><td>SPECIES (m/zDetector) TIME (EPOCH)</td><td>Detector can be F or M, time of measurement (UNIX time).</td></tr><tr><td>SPECIES (m/zDetector) CONCENTRATION (ccSTP/g)</td><td>Detector can be F or M, dissolved concentration value (ccSTP/g)</td></tr><tr><td>SPECIES (m/zDetector) CONCENTRATION ERR (ccSTP/g)</td><td>Detector can be F or M, dissolved concentration error value (ccSTP/g)</td></tr><tr><td>P_GEMIMS TIME (EPOCH)</td><td>Time of measurement (UNIX time).</td></tr><tr><td>P_GEMIMS (hPa)</td><td>Pressure value (hPa)</td></tr><tr><td>P_GEMIMS ERR (hPa)</td><td>Pressure error value (hPa)</td></tr><tr><td>T_GEMIMS TIME (EPOCH)</td><td>Time of measurement (UNIX time)</td></tr><tr><td>T_GEMIMS (hPa)</td><td>Temperature value (hPa)</td></tr><tr><td>T_GEMIMS ERR (hPa)</td><td>Temperature error value (hPa)</td></tr></tbody></table>

Here is how ruedi_convert works :

1. Extraction of the gases and their partial pressures and the pressure and temperature from GE-MIMS sensors. Here this Total Gas Pressure (TGP) includes all
dissolved gases partial pressures, including major and minor species, but **also includes water vapor pressure**. The selected species are summed ($\sum PP_{major\ species}$).

2. The water vapor pressure is calculated based on the measured temperature :

$$P_{water vapor} = 1013.25 \times \exp \left( 24.4543 - \frac{6745.09}{T + 273.15} - 4.8489 \times \log \left( \frac{T + 273.15}{100} \right) \right)$$

and the associated error is calculated the same way with $T$ term replaced by $T + T_{err}$ where $T_{err}$ is the measurement uncertainty related to the temperature sensor.

3. Water vapor pressure is subtracted from TGP to obtain Total Dry Gas Pressure (TDGP). All partial pressures are then normalized to ensure that they are consistent with the TDGP : $PP_{gas} = PP_{measured} \times \frac{TDGP}{\sum PP_{major\ species}}$.

4. Henry's coefficient for each gas at the sample temperature are retrieved to compute the dissolved gas concentration (see below) : $C_{dissolved} = \frac{PP_{gas}}{H}$.

5. An uncertainty in concentration using the error in partial pressure and Henry's coefficient is calculated following a standard quadrature error propagation :

$$C_{dissolved err} = \sqrt{\left(\frac{PP_{gas}}{H + H_{err}} - C_{dissolved}\right)^2 + \left(\frac{PP_{gas err}}{PP_{gas}} \times C_{dissolved}\right)^2}$$

Here $H_{err}$ correspond to the absolute value of $dH - H$, where $dH$ is the (temperature dependent) Henry's constant calculated for $T + T_{err}$.

As seen above, the conversion to dissolved concentrations requires Henry's constant, which defines the relationship between the gas's concentration in the liquid and its partial pressure in the gas phase. However, in many scientific fields (e.g., oceanography, environmental science), it's not enough to know just the Henry's constant alone. For instance, when modeling gas exchange in the ocean or atmosphere, scientists often need to know how much gas can dissolve into water (solubility) and how fast the gas will move in the medium (diffusivity). Therefore, diffusivity and solubility in water at the given temperature (in K) and salinity (in g/kg) are also calculated and displayed in the console. The volume fraction in air is also calculated. These calculations are detailed in the source code rP_atmos_gas.m on GitHub (https://github.com/brennmat/ruediPy/blob/master/octave/rP_atmos_gas.m) and will not be explained in this guide.

Henry's constants are calculated depending on the nature of the gas species involved in the calculation (and its m/z ratio). Each species has its own formula. Therefore, not all elements are available and most of them are typical atmospheric gases (with their isotopes) :

1. Helium : 'He', 'He-4', 'He_4', 'He-3', 'He_3'

2. Neon : 'Ne', 'Ne-20', 'Ne_20', 'Ne-22', 'Ne_22'
3. Argon: 'Ar', 'Ar-36', 'Ar_36', 'Ar-40', 'Ar_40'

4. Krypton: 'Kr', 'Kr-78', 'Kr_78', 'Kr-80', 'Kr_80', 'Kr-82', 'Kr_82', 'Kr-84', 'Kr_84', 'Kr-86', 'Kr_86

5. Xenon: 'Xe', 'Xe-124', 'Xe_124', 'Xe-126', 'Xe_126', 'Xe-128', 'Xe_128', 'Xe-129', 'Xe_129', 'Xe-130', 'Xe_130', 'Xe-131', 'Xe_131', 'Xe-132', 'Xe_132', 'Xe-134', 'Xe_134', 'Xe-136', 'Xe_136'

6. Sulfur hexafluoride: 'SF6'

7. Dioxygen: 'O2', 'O2-34', 'O2-35', 'O2-36'

8. Dinitrogen: 'N2', 'N2-28', 'N2-29', 'N2-30'

9. Methane: 'CH4'

10. Carbon dioxide: 'CO2'

11. Propane: 'C3H8'

12. Dihydrogen: 'H2'

All Henry's constants are calculated using an equation of the following form (except for H₂, CO₂, CH₄, C₃H₈ and SF₆):

$$H = \exp \left( a + b \times \frac{100}{T} + c \times \log \left( \frac{T}{100} \right) - d \times \frac{T}{100} + S \times \left( -e + f \times \frac{T}{100} - g \times \left( \frac{T}{100} \right)^2 \right) \right) \times \frac{P_{\text{dry}}}{(1 - P_{\text{vapor}})} \times \frac{1}{1000} \quad (3.1)$$

with T in Kelvin, the water vapor in hPa calculated based on temperature using the following formula: $P_{\text{vapor}} = 10^{\frac{(0.7859+0.03477 \times T)}{(1+0.00412 \times T)}}$ (with T here in Celcius) and $P_{\text{dry}} = P - P_{\text{vapor}}$ (with P the total pressure in atm). The a to g constants depends on the species. For species integrating isotopes, the calculated Henry constants are weighted by fractionation coefficients. For further informations on these constants and coefficients, see the GitHub of ruediPy (https://github.com/brennmat/ruediPy/blob/master/octave/rP_atmos_gas.m), where they are provided with their respective references. The code includes the possibility of using alternative methods for calculating Henry's law constants, fractionation coefficients, solubilities, and diffusivities for certain species. These methods are available on GitHub; however, since they are not the default options, they are not detailed in this guide.

### Warning

Beyond temperature, determining Henry's constant also requires accounting for the water's salinity. By default, calculations assume a salinity of 0, representing freshwater conditions. Corrections may be necessary.
For species whose Henry's law constant is not determined using Equation 3.1, the calculation is instead based on the species' solubility in water. This is done using the inverse Henry's law formula, accounting for its temperature dependence to ensure accuracy across varying conditions:

1. $kH_0$ is the Inverse Henry's constant at a reference temperature of 298.15 K in $mol/m^3/Pa$.

2. The temperature dependence constant $uT$ (in K) defines, how $kH$ varies with temperature: $uT = \frac{\ln(kH)}{d(1/T)}$.

3. The Inverse Henry's coefficient $kH(T)$ is calculated for a given temperature $T$ (in Kelvin) using the formula: $kH(T) = kH_0 \times \exp(uT \times (\frac{1}{T} - \frac{1}{298.15}))$, giving an Inverse Henry's coefficient in $mol/m^3/Pa$.

4. The Henry's constant $H$ is then calculated as the inverse of the Inverse Henry's constant $kH$.

5. The constant in $Pa/mol/m^3$ is then converted to ccSTP/g (knowing that $mol \times 22414.1$ gives ccSTP).

**Note**

The values for $uT$ and $kH_0$ come from scientific literature. The references can be found on the ruediPy GitHub, yet most of them comes from Rolf Sander's Henry's Law Database https://www.henrys-law.org/henry/ which compiles Henry's law constants for various gases from multiple experimental studies.
References

Matthias S. Brennwald., Yama Tomonaga, and Rolf Kipfer (2020). "Deconvolution and compensation of mass spectrometric overlap interferences with the miniRUEDI portable mass spectrometer". In: MethodsX 7.24, p. 101038. ISSN: 2215-0161. DOI: 10.1016j.mex.2020.101038. URL: https://www.sciencedirect.com/science/article/pii/S2215016120302582.

Matthias S. Brennwald., Mark Schmidt., Julian Oser, and Rolf Kipfer (2016). "A Portable and Autonomous Mass Spectrometric System for On-Site Environmental Gas Analysis". In: Environmental Science & Technology 50.24, pp. 13455-13463. DOI: 10.1021/acs.est.6b03669. URL: https://pubs.acs.org/doi/10.1021/acs.est.6b03669.

Stanford Research Systems, Inc. (2009). Models RGA100, RGA200, and RGA300 Residual Gas Analyzer: Operating Manual and Programming Reference. User manual. Stanford Research Systems, Inc. URL: https://thinksrs.com/downloads/pdfs/manuals/RGAm.pdf (visited on 02/13/2025).
<figure><img src="image_17.png" /></figure>
# Appendices
A
Ionization at 70 eV

<table><caption>**Table A.1:** m/z ratios of various frequently encountered species and their ionized species (and m/z ratios) at 70 eV.</caption><thead><tr><th>Species</th><th>Ionized species (70 eV)</th><th>m/z</th></tr></thead><tbody><tr><td rowspan="2">H<sub>2</sub></td><td>H<sub>2</sub><sup>+</sup></td><td>2</td></tr><tr><td>H<sup>+</sup></td><td>1</td></tr><tr><td rowspan="3">N<sub>2</sub></td><td>N<sub>2</sub><sup>+</sup></td><td>28</td></tr><tr><td>N<sup>+</sup>, N<sub>2</sub><sup>2+</sup></td><td>14</td></tr><tr><td>N<sup>2+</sup></td><td>7</td></tr><tr><td rowspan="3">O<sub>2</sub></td><td>O<sub>2</sub><sup>+</sup></td><td>32</td></tr><tr><td>O<sup>+</sup>, O<sub>2</sub><sup>2+</sup></td><td>16</td></tr><tr><td>O<sup>2+</sup></td><td>8</td></tr><tr><td rowspan="8">CH<sub>4</sub></td><td>CH<sub>4</sub><sup>+</sup></td><td>16</td></tr><tr><td>CH<sub>3</sub><sup>+</sup></td><td>15</td></tr><tr><td>CH<sub>2</sub><sup>+</sup></td><td>14</td></tr><tr><td>CH<sup>+</sup></td><td>13</td></tr><tr><td>C<sup>+</sup></td><td>12</td></tr><tr><td>H<sub>2</sub><sup>+</sup></td><td>2</td></tr><tr><td>H<sup>+</sup></td><td>1</td></tr><tr><td rowspan="6">CO<sub>2</sub></td><td>CO<sub>2</sub><sup>+</sup></td><td>44</td></tr><tr><td>CO<sup>+</sup></td><td>28</td></tr><tr><td>CO<sub>2</sub><sup>2+</sup></td><td>22</td></tr><tr><td>O<sub>2</sub><sup>+</sup></td><td>32</td></tr><tr><td>O<sup>+</sup></td><td>16</td></tr><tr><td>C<sup>+</sup></td><td>12</td></tr><tr><td rowspan="2">CO</td><td>CO<sup>+</sup></td><td>28</td></tr><tr><td>C<sup>+</sup></td><td>12</td></tr></tbody></table>
<table><caption>Table A.1 continued from previous page.</caption><thead><tr><th>Species</th><th>Ionized species (70 eV)</th><th>m/z</th></tr></thead><tbody><tr><td rowspan="2"></td><td>O<sup>+</sup></td><td>16</td></tr><tr><td>CO<sup>2+</sup></td><td>14</td></tr><tr><td rowspan="5">H<sub>2</sub>O</td><td>H<sub>2</sub>O<sup>+</sup></td><td>18</td></tr><tr><td>OH<sup>+</sup></td><td>17</td></tr><tr><td>O<sup>+</sup></td><td>16</td></tr><tr><td>H<sub>2</sub><sup>+</sup></td><td>2</td></tr><tr><td>H<sup>+</sup></td><td>1</td></tr><tr><td rowspan="2"><sup>40</sup>Ar</td><td><sup>40</sup>Ar<sup>+</sup></td><td>40</td></tr><tr><td><sup>40</sup>Ar<sup>2+</sup></td><td>20</td></tr><tr><td rowspan="2"><sup>84</sup>Kr</td><td><sup>84</sup>Kr<sup>+</sup></td><td>84</td></tr><tr><td><sup>84</sup>Kr<sup>2+</sup></td><td>42</td></tr><tr><td rowspan="2"><sup>132</sup>Xe</td><td><sup>132</sup>Xe<sup>+</sup></td><td>132</td></tr><tr><td><sup>132</sup>Xe<sup>2+</sup></td><td>66</td></tr></tbody></table>
B

Natural abundances

<table><caption>**Table B.1:** m/z ratios of various frequently encountered species and their isotopes with their natural abundances in ambient air. Depending on their abundance, isotopes can cause isobaric interference.</caption><thead><tr><th>Species</th><th>Isotopes</th><th>m/z</th><th>Abundance</th></tr></thead><tbody><tr><td rowspan="2">H</td><td><sup>1</sup>H</td><td><b>1</b></td><td><b>99.99%</b></td></tr><tr><td><sup>2</sup>H</td><td>2</td><td>0.01%</td></tr><tr><td rowspan="2">N</td><td><sup>14</sup>N</td><td><b>14</b></td><td><b>99.63%</b></td></tr><tr><td><sup>15</sup>N</td><td>15</td><td>0.37%</td></tr><tr><td rowspan="3">O</td><td><sup>16</sup>O</td><td><b>16</b></td><td><b>99.76%</b></td></tr><tr><td><sup>17</sup>O</td><td>17</td><td>0.038%</td></tr><tr><td><sup>18</sup>O</td><td>18</td><td>0.2%</td></tr><tr><td rowspan="3">C</td><td><sup>12</sup>C</td><td><b>12</b></td><td><b>98.93%</b></td></tr><tr><td><sup>13</sup>C</td><td>13</td><td>1.07%</td></tr><tr><td><sup>14</sup>C</td><td>14</td><td>trace</td></tr><tr><td rowspan="3">Ar</td><td><sup>36</sup>Ar</td><td>36</td><td>0.336%</td></tr><tr><td><sup>38</sup>Ar</td><td>38</td><td>0.063%</td></tr><tr><td><sup>40</sup>Ar</td><td><b>40</b></td><td><b>99.6%</b></td></tr><tr><td rowspan="2">He</td><td><sup>3</sup>He</td><td>3</td><td>0.000137%</td></tr><tr><td><sup>4</sup>He</td><td><b>4</b></td><td><b>99.999%</b></td></tr><tr><td rowspan="3">Ne</td><td><sup>20</sup>Ne</td><td>20</td><td>90.48%</td></tr><tr><td><sup>21</sup>Ne</td><td>21</td><td>0.27%</td></tr><tr><td><sup>22</sup>Ne</td><td><b>22</b></td><td><b>9.25%</b></td></tr><tr><td rowspan="5">Kr</td><td><sup>78</sup>Kr</td><td>78</td><td>0.35%</td></tr><tr><td><sup>80</sup>Kr</td><td>80</td><td>2.25%</td></tr><tr><td><sup>82</sup>Kr</td><td>82</td><td>11.6%</td></tr><tr><td><sup>83</sup>Kr</td><td>83</td><td>11.5%</td></tr><tr><td><sup>84</sup>Kr</td><td><b>84</b></td><td><b>57%</b></td></tr></tbody></table>
<table><caption>Table B.1 continued from previous page.</caption><thead><tr><th>Species</th><th>Isotopes</th><th>m/z</th><th>Abundance</th></tr></thead><tbody><tr><td></td><td><sup>86</sup>Kr</td><td>86</td><td>17.3%</td></tr><tr><td rowspan="8">Xe</td><td><sup>124</sup>Xe</td><td>124</td><td>0.1%</td></tr><tr><td><sup>126</sup>Xe</td><td>126</td><td>0.09%</td></tr><tr><td><sup>128</sup>Xe</td><td>128</td><td>1.91%</td></tr><tr><td><sup>129</sup>Xe</td><td>129</td><td>26.4%</td></tr><tr><td><sup>130</sup>Xe</td><td>130</td><td>4.1%</td></tr><tr><td><sup>131</sup>Xe</td><td>131</td><td>21.29%</td></tr><tr><td><sup>132</sup>Xe</td><td><strong>132</strong></td><td><strong>26.9%</strong></td></tr><tr><td><sup>134</sup>Xe</td><td>134</td><td>10.4%</td></tr><tr><td><sup>136</sup>Xe</td><td>136</td><td>8.9%</td></tr></tbody></table>
<figure><img src="image_18.png" /></figure>
<figure><img src="image_19.png" /></figure>