The perfection of Raman spectroscopic gas densimeters

The uncertainty is a fundamental property of scientific data values, and it expresses a state of limited knowledge where it is impossible to exactly describe the existing state (e.g. Drosg, 2009). Uncertainties can be estimated for a single measurement and for multiple measurements of the same object. The present work uses the uncertainty of single measurements, which is limited by the precision of the spectrometer, along with other factors that might affect the ability to make the measurement. Calculations with these uncertainties are performed with the best and worse-case scenarios (upper-lower bounds method). Multiple measurements can be analysed with probability distribution functions. The uncertainty may be defined by the range around the best estimate with a 100% confidence (maximum uncertainty). The best estimate can be defined as an average value, and the standard deviation (standard uncertainty) represents the 1  confidence interval (i.e. about 68.27% for a Gaussian distribution). Most publications about the reliability of Raman band peak position estimations include this statistical method to define uncertainties, and do not consider precision of the spectrometer. In addition, probability distribution functions are also used in a completely different context for Raman spectra, i.e. mainly to reproduce the morphological properties of Raman bands. For example, the peak position of a Raman band is 50 times estimated with a specific best-fit probability distribution function, and these peak values are submitted to a statistical analysis, resulting in a best estimate (average) and a calculated uncertainty (confidence interval).

(1 where a is maximum amplitude, p is centre position, q = w (= FWHM) Alternative and equivalent definition (e.g.PeakFit v4.12, SYSAT Software Inc.): (2 where a0 is maximum amplitude, a1 is centre position, and a2 is distance between inflection point and centre position (i.e.width).

S2.2 Lorentzian function (Cauchy distribution)
Software LabSpec defines the parameters p (peak position), a (peak amplitude), and w (full width at half maximum, FWHM) where a is maximum amplitude, p is centre position, q = w (= FWHM) Alternative and equivalent definition (e.g.PeakFit v4.12, SYSAT Software Inc.): (5 where a0 is maximum amplitude, a1 is centre position, and a2 is distance between inflection point and centre position (i.e.width).

S2.3  Combination Gaussian-Lorentzian function (symmetric)
Software LabSpec defines the parameters p (peak position), a (peak amplitude), and w (full width at half maximum, FWHM) and g (Gaussian contribution) LabSpec reference manuals do not provide any definition of mixed Gaussian and Lorentzian functions.
A simple summation of fractions of individual distribution functions that have the same a, p, and w values can be deduced from manual analyses of spectra.
=  •   + (1 − ) •   (7) the parameter g is the Gaussian fraction in the combined function (value between 0 and 1) Alternative, but not equivalent definition (e.g.PeakFit v4.12, SYSAT Software Inc.): where a0 is maximum amplitude, a1 is centre position, a2 is FWHM, and a3 is the fraction of Gaussian (value between 0 and 1).Note that the definition of the a2 parameter is different from the a2 in a single Gaussian and a single Lorentzian function.
This function can be summarized as: Comparison of both functions (7 and 8): a distribution curve constructed with a3 = 0.5 (half Gaussian and half Lorentzian) according to PeakFit v4.12 corresponds to g = 0.596 in the LabSpec 5 and 6 software.

S2.4  Asymmetric Gaussian-Lorentzian function (LabSpec 6)
Software LabSpec defines the parameters p (peak position), a (peak amplitude), w (peak full width at half maximum, FWHM), g (Gaussian contribution), and t (asymmetry factor) LabSpec reference manuals do not provide any definition of asymmetric mixed Gaussian and Lorentzian functions.Detailed analyses of the peak fitting application reveal that the symmetric functions are split in two halves (left and right of the centre position at p).Each half has the same maximum amplitude (a), but different FWHM.
In symmetric functions: New definition in asymmetric functions: Real peak width at half maximum: Symmetric functions are defined with t = 0.5 It should be noted that the parameter w is not equal to the FWHM, a mistake in the LabSpec 6 reference manuals: where a0 is maximum amplitude, a1 is centre position, a2 is related to the width, and a3 is the shape definition (>0).

S3  Spectrometer calibration of the LabRAM 300 and LabRAM HR Evolution
The transformation of a pixel number in the diode array of the detector to wavelength is calibrated with two parameters: 1. the position of the zero order of diffraction (0.0 nm); 2. the number of nm moved per motor step of rotation of the gratings by measuring a standard (either a known Raman shift or an atomic emission line).In other words, the general calibration method of the LabRAM system is a two-point fitting analysis with a linear interpolation which is reflected by these two parameters.The position of the zero order is defined by the parameter "zero" or "offset shift" in the software LabSpec 5 and 6, respectively, and it corresponds to the number of steps between the switch of the mechanical reference of the motor that drives the rotation and the position of 0 nm (i.e.zero order).Figure S7 illustrates that approximately 5 pixels are involved in the signal of the zero order in both systems.The LabRAM 300 system has a pixel resolution of 0.1393 nm at the zero order with the 600 mm -1 gratings (Fig. S7a) and the LabRAM HR Evolution 0.01105 nm with the 1800 mm -1 gratings (Fig. S7b).The pixel with the highest intensity is roughly optically estimated in a first approach, and subsequently positioned in the centre of a spectral window.It is recommended by Horiba to have this band position within ± 1 pixel of 0 nm (visual determination).The accuracy can be improved by estimation of the centre position with a symmetrical Gaussian-Lorentzian function.The latter procedure is performed by the automatic calibration option in LabSpec 6.Earlier versions of LabSpec offer the possibility to perform manually this fitting procedure.An example of the sensibility of the zero position to "offset shift" number is illustrated by a shift of 0.022 nm per 5 steps in the LabRAM 300 system with an 1800 mm -1 gratings, which is about half the size of one pixel.

Figure S7
. Spectra of the zero order (in wavelength, nm) of the LabRAM 300 system (a) and the LabRAM HR Evolution system (b).The pixel resolution (pixel res.) of the latter system is approximately improved by a factor ten. "zero" and "offset" numbers are instrument specific values.(c) Spectrum of the Nd-YAG laser (in relative wavenumber, cm -1 ) obtained with the LabRAM 300 system.The coefficient (coeff.) is experimentally determined using a reference Raman band with a known relative wavenumber.The thick solid lines are symmetrical Gaussian-Lorentzian best-fit curves.
Subsequently, the Raman shift of silicon (Stokes scattering,  = 520.7 ± 0.5 cm -1 ), laser excitation wavelength (Rayleigh scattering,  = 0.0 cm -1 ; Fig. S7c), or an atomic emission lines (e.g.neon) is used to define the number of nm moved per motor step of the Sinus Arm Drive (i.e."koeff" or "coeff" in LabSpec 5 and 6, respectively).The automatic calibration procedure allows the definition of only one specific Raman band as a relative wavenumber; therefore, neon lines must be recalculated in a virtual Raman shift number.For example, the 638.29914 nm neon line is transformed to 135.7462 cm -1 shift with the He-Ne laser (excitation laser wavelength 632.816 nm).The measured neon line or a reference Raman band is always positioned in the centre of a spectral window in the automatic calibration procedure.Similarly to the zero order, the peak position of the signal is determined with a symmetrical Gaussian-Lorentzian distribution function.Finally, a measurement session can start with the estimated "offset shift" and "coeff" values.

S4  Uncertainty of gratings rotation in the calibration procedure
Automatic estimated peak positions of reference Raman bands in the calibration procedure of the LabSpec software are seldomly equal to the predefined values (Table S1).The LabSpec software allows a manual correction of "coeff" parameter to be able to reproduce accurate wavelength values.For example, the 540.05616 nm neon line is initially estimated at 540.0510 nm, as defined by a Gaussian-Lorentzian best-fit peak and a coefficient of 0.002019020.This position (540.0562nm, "First" in Table S1) is only obtained after manual fine-tuning of the coefficient to 0.002019029.This example illustrates that a relatively small difference in the coefficient (ca. 10 -8 ) may shift the initial detection of wavelength with 5 pm.
After the calibration procedure, rotation of the gratings forth and back, relocating the same spectral window position affects the reproducibility of the reference peak position ("Second" in Table S1).For example, a fine-tuned calibration of the 630.47893 nm neon line with the LabRam 300 results in a peak position of 630.479 nm, however after gratings rotations this position is modified to 630.493 nm (i.e."First" and "Second" in Table S1).This deviation corresponds to ca. 0.35 cm -1 wavenumber.The Sinus Arm Drive is not able to provide a sufficiently smooth movement to relocate the gratings with equal constant values.Peak positions of the same neon line calibrated with the newer LabRAM HR Evolution system may shift up to 3 pm, which is a significant improvement of the mechanical accuracy of the Sinus Arm Drive in more modern systems.Nevertheless, the Sinus Arm Drive adds an extra source of uncertainty in the estimation of calibrated peak position of Raman bands.

S5  Laser wavelength calibration
The well-defined He-Ne laser is selected to test the calibration procedures described in paragraph 6.3 to determine the wavelength of the laser (Fig. S8).The one-point calibration (see paragraph 6.1) is performed with the 638 neon line (Fig. S8a).This relatively distant neon line is located at about +5.5 nm higher wavelength than the laser, consequently it is expected to obtain slightly deviating values of the laser wavelength.The laser wavelength is estimated at values between 632.816 and 632.820 nm, with a mode at 632.816 nm according to multiple settings with variable positions of the spectral window.Subsequently, the laser wavelength is estimated with the proper bracketing technique using a best-fit linear correction through four adjacent neon lines: 626, 630, 633, and 638 (Fig. S8b).The laser signal is approximately positioned in the centre of the spectral window.The calibrated wavelength of the He-Ne laser varies between 632.813 and 632.818 nm and is averaged at 632.816 ± 0.003 nm.Repetition of this procedure over several weeks resulted in similar values.In conclusion, the He-Ne laser wavelength in the LabRAM HR Evolution system is reproduced with the modified bracketing technique with a variability of 3 pm.An example of Nd-YAG laser wavelength determination is illustrated in Figure S9.The reported values given in the text and figures are only valid to this example due to the variability of the laser wavelength.The one-point calibration method (see paragraph 6.1) using the 534 neon line results in calibrated wavelengths between 532.044 to 532.048 nm (Fig. S9a).The 533 neon line that is closer positioned to the laser can also be used for the one-point calibration, resulting in a calibrated wavelength of 532.036 to 532.045 nm (Fig. S9b).This relatively weak neon line cannot be detected with the use of an edge filter and is mainly observable by positioning the neon lamp behind the edge filter.The relatively low intensity of the 532, 533, and 534 neon lines may prevent any reliable Gaussian-Lorentzian peak fitting results, and it may introduce relatively large uncertainties in peak positions.The use of neon lines closer to the Rayleigh scattering result in lower calibrated wavelengths, and the best approach results in a wavelength of ca.532.035 nm.The variability of the laser wavelength is evidenced with similar calibration procedures with the same instrument settings performed in the same laboratory after several days (532.055 to 532.058 nm), or weeks (532.090 to 532.102 nm, mode at 532.100 nm).
The proper bracketing technique (see paragraph 6.2) to calibrate the wavelength of the Nd-YAG laser involves six adjacent neon lines: 529, 530, 532, 533, 534, and 534a (Fig. S9b).The resulting calibrated wavelength varies significantly according to individual measurement sessions and is affected by variable room conditions.For example, a calibrated wavelength of 532.059 ± 0.005 nm could not be reproduced the following day, that revealed wavelengths of 532.113 ± 0.006 nm.Each session has a laser wavelength reproducibility of about 6 pm, i.e. approximately twice as much as the uncertainty of the He-Ne laser.The examples illustrate that the Nd-YAG laser must be experimentally determined before any measurement session, and that it is very unlikely that it has a constant wavelength over longer periods of investigation.the same spectrum after positioning the neon lamp behind the edge filter with six neon lines on both sides of the laser wavelength that can be used for calibration with the proper bracketing technique (Eq. 1 and 2).

S6  Spectral window internal irregularities
The estimated peak positions of neon lines and Raman bands with Gaussian-Lorentzian best-fit probability distribution functions are significantly affected by their relative position in a spectral window (Fig. S10, S11).

S7  Best-fit probability distribution functions
The variation in peak position estimation according to multiple PDF's decreases if the pixel resolution is increased by using a larger line density of the gratings (1800 mm -1 in Fig. S12a) and if more pixels are involved in the shape definition by using a larger focal length (Fig. S12b).The 574 neon line is detected by about 6 pixels with the LabRAM 300 (1800 mm -1 gratings) (Fig. S12a).All best-fit PDF have similar shapes, but the peak position may still vary significantly between 1398.220cm -1 (Gaussian) to 1398.406 cm -1 (asymmetric Gaussian-Lorentzian).The Lorentzian curve result in the most deviating intensity values and must be regarded an unreliable shape reproduction of this neon line.The LabRAM HR Evolution with 1800 mm -1 gratings detects the 650 neon line within 12 pixels (Fig. S12b).The variation in peak estimation according to different PDF is decreased to about 0.03 cm -1 , i.e. from 433.192 cm -1 (Gaussian) to 433.208 cm -1 (asymmetric Gaussian-Lorentzian).This variation is similar to the variability that resulted from the precision of the laser wavelength (632.816± 0.001 nm), corresponding to a wavenumber variability of ± 0.025 cm -1 .

S8  Wandering neon emission line
The 633 neon line is analysed with a Nd-YAG laser (532.13 nm) in the LabRAM HR Evolution system and is shifted systematically to lower relative wavenumbers with increasing wavelength of the spectral window position (Fig. S13), i.e. the reversed effect compared to Figure 12b (with a He-Ne laser).The minimum step size of the gratings rotation is 0.002 nm ("coeff" parameter 0.002019074), and only 4 steps are included in one cycle due to a pixel resolution of 0.209 cm -1 .The symmetric and asymmetric Gaussian-Lorentzian best-fit curves reveal a gently wavy appearance, and corresponding peak positions are within the uncertainty of SMT, both at the upper and lower end of the error bars.

S9  Comparison with literature: Methane
The calibrated peak positions of CH4 within the fluid inclusions illustrated in Figure 13 and the relationship to CH4 density are inconsistent any equation published in literature.To illustrate this controversy, the density of the 0.3461 g•cm -3 fluid inclusion (Fig. 13a) is calculated at 0.300 ± 0.007 g•cm -3 with the equations from Sublett et al. ( 2020) Moreover, the experimental data in literature reveal a large variability, and inconsistent relationship between density and Raman shift.The discrepancies were recognized by Lu et al. (2007), Lin et al. (2007), Shang et al. (2014), Zhang et al. (2016) and Sublett et al. (2020).The simple addition or subtraction of an arbitrary number 0 was suggested to equalize different data sets (Zhang et al., 2016;Lu et al., 2007), that reveal similar trends (slope) in the relationship between CH4 Raman band and density (or pressure).Sublett et al. ( 2020) merely "corrected" their experimental data to obtain similar values as Lin et al. (2007).These studies do not adequately address the cause of the variation.Mathematical equations given by Lin et al. (2007), Shang et al. (2014), andSublett et al. (2020) have no general application to fluid inclusion studies as they are instrument specific, i.e. they cannot be applied to Raman systems other than the ones that are used in these studies.The equation for the difference between CH4 Raman bands "near zero" density and the measured shift (D) from Zhang et al. (2016) can also not be used in fluid inclusion research because D values between -3 cm -1 and -7.2 cm -1 can be assigned to multiple densities within the relatively large interval 0.11 to 0.53 g•cm -3 .For example, a D value of -5 cm -1 corresponds to a density of 0.1962 g•cm - 3 and 0.4850 g•cm -3 .It must be noted that D equations always need an extra estimation, i.e. a hypothetical constant value of 0 to be able to calculate a density from a specific Raman shift.
The main causes of inconsistent data sets are highly underestimated uncertainty of individual measurements and partly insufficient calibration procedures, as described in the preceding paragraphs.Reproducibility, i.e. the average and standard deviation of multiple measurements of the same Raman band is often mistaken for the uncertainty in individual measurements (De Bièvre, 2008;Drosg, 2009).The CH4 Raman bands measured with different Raman systems in the present study reveal consistent peak positions and it is expected that similar calibration procedures applied to previously work would have resulted in a consistent data set, and a uniform equation of the relationship between Raman band peak position of CH4 and density, however, with a much larger error as indicated in previous publications.

S10  CO2 density estimation of fluid inclusions
At room temperature, the fluid inclusions in Figure 16 contain an aqueous phase and a homogeneous CO2-rich phase.Microthermometry reveal melting temperatures of CO2 at -56.6 ˚C in the presence ice and CO2-clathrate.The CO2 phases in the fluid inclusion in Fig. 16a homogenize at +12.6 ˚C in the vapour phase.Despite optical difficulties to estimate this temperature, cycling experiments with the use of metastability due to nucleation difficulties in cooling systems result in an uncertainty of ±0.1 ˚C (i.e.best value of a heating-freezing stage).CO2-clathrate dissolution occurs at + 9.9 ˚C (Q2 melting) (Bakker, 1997).The density of the homogeneous CO2 phase can be directly calculated with the equation of state from Span and Wagner (1996) that was adapted for fluid inclusion work in the programs Loner18 and LonerSpW in the software package FLUIDS (https://fluids.unileoben.ac.at) (Bakker, 2003) for pure CO2 phases at 0.1477 ± 0.0006 g•cm -3 (298 ± 1 cm 3 •mol -1 ).The low concentration of H2O in the vapour bubble, i.e. 0.001 mole% at room temperatures is assumed to have a negligible effect on Raman peak properties of CO2.Fluid inclusion in Fig. 16b reveals a homogenization of CO2-rich phases at +9.3 ˚C in the liquid phase in the presence of a CO2-clathrate and an aqueous liquid solution.The clathrate dissolves completely at +10.1 ˚C.The CO2 liquid and vapour phases homogenize at +6.2 ˚C to a liquid phase in the metastable absence of CO2-clathrate and in the presence of only an aqueous liquid solution.The dissolution and homogenization behaviour of this fluid inclusion in a heating experiment corresponds to settings described in Diamond (1992) and Bakker (1997), and its fluid properties can be modelled with the program "NOSALT" and "CURVES" in the package "Clathrates" (Bakker, 1997).The density of the homogeneous CO2 phase can be directly modelled with the homogenization temperature in the metastable absence of a clathrate using the same programs Loner18 and LonerSpW: 0.8880 ± 0.0007 g•cm-3 (49.56 ± 0.03 cm 3 •mol -1 ).This vapour phase contains 0.4 mole% H2O at the clathrate dissolution temperature and is considered to behave as a pure CO2 phase.

S11  Comparison with literature: Carbon Dioxide
Calibrated CO2 Raman bands and corresponding densities are compared to the purely empirical equations presented in previous publications (Table S2).A large variety of the Fermi diad distance is calculated for a measured density of 0.1477 g•cm -3 (fluid inclusion Fig. 16a): from 102.828 to 103.202 cm -1 .Vice versa, the density is calculated with numerous equations presented in literature using a calibrated Fermi diad of 103.123 cm -1 is varying between 0.1238 and 0.2623 g•cm -3 , corresponding to a relative difference up to 78% (Table S2a).The calculated densities for the 0.8880 g•cm -3 fluid inclusion (Fig. 16b) vary to an even larger extend, from 0.7517 to 0.9463 g•cm -3 (Table S2b).The main causes of these differences are already elucidated for the CH4 examples, and include inadequate calibration methods and underestimated uncertainties of individual measurements.Raman systems that were calibrated with reference Raman bands of naphthalene, benzonitrile, and diamond do not provide simultaneously recorded CO2 spectra (Kawakami et al., 2003;Yamamoto and Kagi, 2006;Wang et al., 2011;Remigi et al., 2021).These studies ignore the uncertainty of the reference values: for example ±0.29 to ±0.49 cm -1 for naphthalene, and ±0.39 to ±0.98 cm -1 for benzonitrile (McCreery, 2000).The inferred uncertainty of the Fermi diad based on these reference bands does not allow the estimation of an accurate equation to define peak positions within the wavelength range detected by one pixel.These uncertainties often exceed pixel resolutions, for example ca.1.5 cm -1 in Kawakami et al. (2003), Yamamoto and Kagi (2006); ca. 1 cm -1 in Wang et al. (2011).2019) contains many typographical errors in the definition of parameters: the minus signs are missing for the parameters a14, a16, a19, a22, a26, and a29 in their equations 2 and 3.
(Table S2).Moreover, Wang et al. (2019) provide two inconsistent equations to calculated density from the Fermi diad distance (e.g.103.123 cm -1 , Table S2a): 0.1255 g•cm -3 using temperature (Eq. 3 in Wang et al., 2019), and 0.1507 g•cm -3 using pressure (Eq. 2 in Wang et al., 2019).Both equations can be used assuming that the fluid inclusion in Figure 16a contains at 22 ˚C a CO2-rich vapour bubble with an internal pressure of 5.21 MPa (calculated Span and Wagner, 1996).The calibration method of a specific Raman band according to Lin et al. (2007) was used by Fall et al. (2011) andSublett et al. (2020), using two neon lines that bracket the Fermi diad, and both studies reveal similar results.However, both the upper and lower band of CO2 are corrected with equal values according to this method (cf.paragraph 4 "Calibration method bazar"), i.e. a correction value defined at the centre between the two neon lines (1031.42 and 1458.58cm -1 ).Consequently, the Fermi diad is not affected by these corrections, which correspond to the assumption of a "linear offset" of the monochrometer.Unfortunately, Fall et al. (2011) ] and Sublett et al. ( 2020) do not provide equations for the relationship between individual upper or lower CO2 band peak positions and density or pressure.

Figure S8 .
Figure S8.Spectrum of Rayleigh scattering of the He-Ne laser (632.816nm) and two adjacent neon emission lines (638 and 640) in the Stokes scattering range (a), and with two adjacent neon lines (626, 630, 633, and 638) on either side in both the Stokes and anti-Stokes scattering range (b) by positioning the neon lamp behind the edge filter.See text for further details.

Figure S9 .
Figure S9.(a) Spectrum of the Rayleigh scattering of the Nd-YAG laser and three adjacent neon emission lines (534, 534a and 540) in the Stokes scattering range that can be used for the one-point calibration procedure.(b)the same spectrum after positioning the neon lamp behind the edge filter with six neon lines on both sides of the laser wavelength that can be used for calibration with the proper bracketing technique (Eq. 1 and 2).

Figure S10 .
Figure S10.Raman band of silicon and neon emission lines in two spectra recorded in different spectral window position: a. 532.111 nm; and b. 549.661 nm.The silicon band is bracketed and calibrated by the 540.05616 nm and 556.27662 nm neon lines.This setup is used to determine the variability in peak position.Raman system: LabRAM HR Evolution, Nd-YAG laser, 600 mm - 1 gratings, 70 mm confocal hole.

Figure S11 .
Figure S11.Shift in the detected peak positions of neon emission lines 659.89528 nm (a) and 534.10938 nm (b) dependent on their position within a single spectral window.The position is specified in absolute wavelength and in a relative number.The latter is defined by the relative position of the neon line within a spectral window (in nm): 0 is the centre position, positive values represent lines that appear to the right site, and negative values to the left site

Figure S12 .
Figure S12.(a) Various PDF fitted to the 574 neon line analysed with the LabRAM 300 system (1800 mm -1 gratings).(b) Gaussian (black curve) and Lorentzian (green curve) distribution curves fitted to the 650 neon line with the LabRAM HR Evolution system.Peak positions (in cm -1 ) of various PDF's are given in the included box.

Figure S13 .
Figure S13.Relative wavenumber of the peak position of the 633 neon line as a function spectral window position.

Table S1 .
Calibration of several neon lines (calibration references) according to the initial calibration procedure of the Raman spectrometers (Automatic), fine-tuned coefficients with highly accurate wavelengths (First), and the uncontrolled shift after rotation of the gratings with the Sinus Arm Drive (Second).See text for further details.

Table S2a .
Wang et al. (2019)017)and Fermi diad distances of the fluid inclusion illustrated in Figure16awith published purely empirical equations.Pressure in fluid inclusion at 22 °C is 5.21 MPa.Wang et al. (2019)a .Line segment calibrations are only able to correct the difference between two Raman bands, e.g. the Fermi diad.The upper and lower CO2 band was bracketed with two neon lines byLamadrid et al. (2017), whereasWang et al. (2019)use two neon lines both at higher relative wavenumbers than the upper CO2 band, i.e. outside the wavenumber range where the Fermi diad occurs.The two methods resulted in significantly different density estimations a Footnote:Wang et al. (

Table S2b .
Comparison of density and Fermi diad distances of the fluid inclusion illustrated in Figure16bwith published purely empirical equations.Pressure in fluid inclusion at 22 °C is 14.38 MPa.