Ratiometric pathlength calibration of integrating sphere-based absorption cells

Chemical sensors based on optical absorption require accurate knowledge of the optical pathlength of the sample cell. Integrating spheres offer increased pathlengths compared to single pass cells combined with tolerance to misalignment, making them attractive for use in challenging environments subject to vibration. However, the equivalent optical pathlength can be degraded by dirt and / or condensation on the inner surface of the sphere. We present a new scheme for in-situ calibration that uses a ratiometric two-beam approach. Results are presented for an integrating sphere used in the measurement of methane by tunable diode laser spectroscopy (TDLS) at 1651nm. Reduced sphere reflectivity was simulated by applying small areas of black tape on the inner surface. At methane concentrations of 1500ppm and 3125 ppm, for areas of contamination up to 2.3% of the sphere wall, the technique reduced the error from over 50% to within ±4%. At a concentration of 6250 ppm and the most severe fouling corresponding to 2.9% wall coverage, the technique reduced the error from 55-65% to within ±11%. Published by The Optical Society under the terms of the Creative Commons Attribution 4.0 License. Further distribution of this work must maintain attribution to the author(s) and the published article’s title, journal


Introduction
Optical absorption sensors are used in the measurement of concentrations of analytes including gases, liquids and solid samples. For gas sensing, they offer a high level of specificity to the gas of interest, as well as minimal drift and fast response times [1]. The measurements can be made in-situ and in real time, which is beneficial for processes requiring continuous monitoring.
Sensor performance can be enhanced by using longer pathlengths in multipass cells [2]. Typical multipass cells include the Herriott cell, whereby a single path is created by causing multiple reflections between two mirrors, giving pathlengths of up to 15-100m depending on the number of passes [3]. Cavity ringdown spectroscopy (CRDS) uses multiple reflections between highly reflective mirrors to give very long (km) average pathlengths; absorption is measured from the ringdown time of a signal generated by a pulsed source [4,5]. Other cavity-enhanced systems similarly offer very long (km) pathlengths [1,5]. As the pathlength cannot be accurately determined from the mirror specification, it is often obtained experimentally by measuring the ringdown time. The mirrors used in such cavity-enhanced sensors require very high reflectivity, which can be costly to manufacture, typically show optimum performance only over a small wavelength range and have tight alignment tolerances.
The use of an integrating cavity as an absorption cell has been proposed and investigated for over 40 years [6]. Typical integrating sphere pathlengths of up to 10m are not of the same order as either Herriott cells or cavity-enhanced cells, but offer an advantage in tolerance to misalignment and turbidity within the sample [7], a wide wavelength range of operation and a robust reflective surface. Integrating spheres have been shown to increase the effective pathlength in gas spectroscopy without the need for precise alignment [8]. Originally used for measurement of the emitted flux of light sources, integrating spheres consist of a hollow container with a diffusely reflective internal surface. Ideally, the reflectivity is Lambertian, with the consequence that the irradiance over the surface is constant [9]. This means that detectors placed around the surface should ideally sample a representative measure of the intensity of a source, regardless of where they are placed. This property makes integrating spheres well-suited for light source characterisation but also insensitive to changes in alignment of the source and detector.
For gas detection, there are two or more ports for light sources and detectors as well as two ports for gas inlet and exhaust. To prevent direct illumination of the detector by the light source, a light barrier (or baffle) is often used. Spheres are available for use in the mid infrared, based on a roughened surface coated with gold, and in the near infrared based on pure, sintered PTFE, commercial examples being Spectralon and Zenith. The latter are bulk reflectors in which photons penetrate for some distance; a thickness of 10mm may be required to maintain the manufacturers' stated reflectivity of approx. 99% [9]. Fig. 1 shows a typical integrating sphere. Recent use of integrating cavities in gas detection includes measurement of atmospheric oxygen at 764nm with a 35cm-sided cubic cavity [10], and carbon dioxide at 4.2µm with a cylindrical cavity of radius 2mm and length 200µm [11]. This illustrates the fabrication of cavities over a wide range of physical sizes, and the fact that such absorbance cells do not need to be spherical to be used successfully in this application. Integrating cavities have also been used to measure absorption in biological samples by using ringdown spectroscopy [12].
The effective pathlength is a sensitive function of the mean inner reflectivity. Calculation of the effective pathlength from the mean inner reflectivity is possible in principle, but in practice the latter is generally not known to the required precision and for example may not take account of the true effect of ports [13]. In many practical situations therefore calibration is required, both for new designs and following adjustment of components. Indeed, it has been shown that the measurement of gas absorption provides a sensitive means of calibrating sphere reflectivity [14]. For gases, it can be suitable to calibrate the cell by comparing the absorption measurement with one taken using a second cell with a fixed, known pathlength that contains the same analyte [15]. For use in potentially dirty and / or condensing atmospheres, an in-situ calibration will also be needed to maintain confidence in the measurement.
Different approaches have been taken to the problem of in-situ calibration. Fry et al. [16] and Zhou et. al. [17] have measured the temporal response of a laser pulse to calculate the mean pathlength of the photons from entrance aperture to detector. For a high reflectivity material newly developed by them, Cone et al. measured a ringdown time of approximately 35ns for a 5cm diameter sphere, corresponding to a mean reflectivity of ρ=99.686% and an effective pathlength of 10m [18]. Because these materials are bulk reflectors, the ringdown time includes a proportion of time for photons passing through the analyte, which contributes to the effective pathlength of the absorption cell, plus a proportion of time spent within the bulk material (denoted by Cone et al. as "wall time" [18]), which does not. Use of the ringdown time for in-situ calibration thus requires knowledge of the wall time and confidence that its evolution over time tracks that of the effective pathlength for absorbance measurements. Although the authors stated that the wall time for their high reflectivity material was relatively short (3.5% of the time photons spent in the analyte [18]), it nevertheless represents an uncertainty in the measurement and may not be such a small proportion of the overall decay time for commercial materials such as Spectralon. Secondly, for more conventional materials with relatively shorter pathlengths (around 1m in the example in this paper), there is a need for the detection electronics to have both high gain (to compensate for the low optical throughput of the sphere) and high bandwidth (>50GHz)) as the equivalent ringdown time will be of the order of 3ns. To measure small changes in the ringdown time would require additional bandwidth, limiting the attainable precision. Furthermore, use of pulsed light sources and high bandwidth electronics is not always compatible with many uses of integrating spheres, for example when using a sphere as a sample cell within a commercial (e.g. FTIR) spectrometer with a broadband source, where only slower modulation would be possible.
A second approach, previously published by the authors of this paper [19] and summarised for comparison in Table 1, draws on the well-known "four-beam" technique for characterisation of water turbidity [20] and absorbance [21]. Despite offering an improvement in pathlength calibration accuracy compared with uncompensated measurements, this method presented a number of disadvantages. It required the use of multiple sources and detectors; for TDLS the laser can represent the most significant component cost for the system so this is undesirable. It also relied on a level of symmetry within the system that proved difficult to align, removing an important attractive feature of integrating spheres.
In this paper, we present a simplified version of the four-beam technique that uses a single source and two detectors, so is described as a two-beam approach. The method is easy to align, independent of wall time and ratiometric, so there is no requirement for high bandwidth detectors. Results are presented for detection of methane using TDLS at 1651nm, and compared with the four-beam technique for completeness. Portions of this work were presented at the SPIE Conference on Optical Sensing and Detection in 2018 [22].

Gas spectroscopy using integrating spheres
Quantitative measurements of absorption are based on the Beer-Lambert law [23]: where Φ e (α) is the radiant flux transmitted through the cell in the presence of an absorbing medium, Φ i is the radiant flux incident on the gas cell, α is the absorption coefficient (cm −1 ), and L is the optical path length of the cavity (cm). The absorption coefficient is the product of C, the gas concentration (in atm of partial pressure for example) and ε, the specific absorptivity of the gas, (cm −1 atm −1 ). At low concentrations equation (1) becomes approxmately linear, with the concentration of the gas present directly proportional to the absorbance, such that the absorbance A can be written as follows, where 2.1. The optical pathlength of the sphere The theory and properties of integrating spheres are described in the integrating sphere relations [9]. The multiple directions and distances that photons take through the sphere average to a mean single pass z 0 given by where r is the radius of the sphere. For the purpose of spectroscopy, an important parameter is the sphere multiplier M, which corresponds to the effective number of total passes that light makes across the sphere, as well as to the consequent factor by which the sidewall intensity is increased. M is determined by the reflectivity of the sidewalls ρ 0 and the "port fraction" f, i.e. the proportion of sphere area that corresponds to non-reflecting surface. A further useful parameter is the mean sidewall reflectivity ρ, which takes into account the presence of non-reflective ports: ρ = ρ 0 (1-f ).
The value of ρ 0 can be thus calculated from M: The mean effective pathlength of the sphere, L eff , is then given by the mean pathlength for a single pass and the sphere multipler: Previous work has shown that a small additional pathlength needs to be added to account for launch or delaunch conditions [24]. For an incident collimated beam and a detector with a wide field of view, the additional pathlength is approximately equal to a single pass across the sphere. If we make the simplifying assumption that the sphere acts as a single pass cell with pathlength L eff , eq. (1) can be expressed as As mentioned before, light makes random multiple passes across the integrating sphere until it is absorbed by the photodetector, is absorbed by the reflecting material or leaves the sphere. The consequence is as follows. In the linear region of equation (1), the sphere behaves as a conventional absorption cell and the signal can be modelled with equation (1), using the mean effective pathlength L eff as a substitute for L. However, at higher levels of absorbance, the resulting nonlinearity is greater than would be expected for a single pass of length L eff . This nonlinearity can also have the effect of distorting gas lineshapes, therefore care must be taken when using line fitting or the 2f wavelength modulation spectroscopy (WMS) technique [25]. In this paper however, we make the simplifying assumption that absorption coefficients are sufficiently low to allow a linear approximation to equation (1).
Pathlength calibration is usually required because of uncertainty in the values of both the port fraction f and the surface reflectivity ρ. L eff is a very sensitive function of reflectivity, especially as values of ρ approach unity. For bulk diffusers such as Spectralon and Zenith, reflectivity can change with thickness, and that thickness can change for practical reasons in different locations around the sphere, for example being reduced around the ports in some designs. Combined with possible effects of dirt, this makes the mean surface reflectivity of the sphere difficult to predict. Finally, because the launch and delaunch conditions can add a short section of pathlength to the exponential distribution [24], there may also be a minor effect of set-up geometry.

The sphere throughput
The integrating sphere relations themselves offer a potential solution to the need to monitor and / or compensate for pathlength changes over time. The sphere multiplier M is not only proportional to the effective pathlength L eff but also to the increase in intensity at the sidewalls, and thereby the sphere throughput, as follows.
The surface radiance, B s is given by [9] where Φ i is the flux incident on the sphere and A s is the total inner area of the sphere.
The exit flux at the photodetector, Φ d is defined as [9] where A d is the detector active area and Ω is the projected solid angle (sr) of the detector field of view. Combining eqs. (8) and (9) gives the exit flux at the photodetector for diffuse reflections.
where k is a constant for a given system geometry. The sphere throughput T is then given by Thus, if sphere throughput can be measured accurately, this offers a method to monitor pathlength. However, for a simple measurement using a single source and detector, changes in source intensity, window transmission (e.g. due to fouling over time) and detector responsivity can contribute inaccuracies to this measurement.

Ratiometric pathlength calibration
One method used to measure optical absorption or scattering in samples cells potentially affected by fouling is the so-called four-beam technique used for water quality monitoring [21]. Signals from two sources and two detectors are combined in ratios that remove any dependence on source intensity, window fouling or detector responsivity.
The four-beam method has been adapted to pathlength calibration of integrating spheres. Details of the technique and underlying theory are provided in [19] and summarised below, as well as in Table 1. Two sources (S1 and S2) are established at ports on the sphere that are at right angles. As Table 1 shows, two detectors (D1 and D2) are also provided, aligned so that each is on the opposite side of the sphere to its counterpart source. Light from source S1 is allowed to diverge so that a small proportion of it passes straight across the sphere to detector D1 and the majority is diffusely reflected from an annulus around the detector, a small proportion of which is then sampled by D2. The latter represents a measurement of light that has undergone a long pathlength resulting from multiple diffuse reflections within the sphere. The alignment for source S2 to detectors D2 and D1 is the same as that of S1 to D1 and D2. The sources are turned on sequentially so that independent measurements can be made of the flux from S1 to D1 and D2, and then from S2 to D2 and D1. Thus four measurements are made, two corresponding to a direct pass across the sphere and two to a longer pathlength.
A ratio Q is formed of these four measurements in the absence of absorption [19]; this is termed Q(0). For gas spectroscopy, absorption lines are narrow and therefore this measurement can be made at a neighbouring wavelength where there is no gas absorption. An initial calibration stage determines the value of Q(0) cal , which is then combined with the value measured in situ under potentially fouled conditions, Q(0) foul . The mean effective pathlength of the sphere, termed here L 12 (to indicate the pathlength from source S1 to detector D2) is a function of the initial calibration pathlength and the ratio of the Q(0) values. This is used to correct the absorbance measurement and thus compensate the measurement for changes to the value of L 12 and L 21 resulting from changes in the sphere's internal reflectivity.
In this paper, we introduce a simplified version of this method, using a single source and two detectors (or, by symmetry, a single detector and two sources), termed two-beam pathlength calibration. Again, this is summarised in Table 1.
In our example, we use a single source S1 and two detectors D1 and D2. D1 is placed opposite the entrance aperture for S1, within the first strike spot, such that optical path L 11 is equal to the diameter of the sphere. D2 is placed at right angles, recessed so that it can't see the first strike spot. The optical path L 12 is equal to the effective pathlength of the sphere L eff for multiple reflections, plus the additional single pass across the sphere to the first strike spot. The incident fluxes measured by the detectors D1 and D2 are given by Φ 11 and Φ 12 respectively: I 1 is a scale factor for the source intensity (for example representing window fouling), and R 1 and R 2 represent the responsivities of detector D1 and D2 respectively (including fouling of the window over the detector). Φ i11 and Φ i12 represent the incident flux that enters the direct and indirect/diffuse paths respectively. These quantities are fixed by the alignment geometry; we ensure that the measured quantity Φ 11 is dominated by light in the first strike spot and relatively unaffected by any additional diffusely reflected light. The quantity Q is then formed by As expected, common factors affecting the incoming source intensity (including the condition of the entrance aperture window) as expressed by I 1 have cancelled, leaving factors affecting detector responsivity (including detector window condition) uncorrected. Setting L 12 =L eff + 2r (equation (7)) then gives Under initial (calibration) conditions, we measure the value of Q(0) cal in the absence of an analyte (for gases, at a wavelength adjacent to the gas absorption line where there is no absorption). We compare this to a later value Q(0) foul taken under potentially fouled conditions.
where T cal and T foul are the throughput of the sphere T under initial calibration conditions and later, potentially fouled conditions, respectively. Substituting from equation (11) then gives We now make a simplifying assumption that either there is negligible change in the detector responsivities R, or that any fouling of the detectors is homogeneous, affecting both equally over time. This is not necessarily a reasonable assumption, and we discuss the potential for consequential errors in section 2.4. Substituting from equation (6), we find Where L cal and L foul are the effective pathlengths of the sphere (L eff ) under initial, calibration conditions and later, potentially fouled conditions, respectively. The value of L cal can be determined via an initial calibration using a known analyte. The value of L foul can then be determined using parameters measured during the initial calibration and fouled conditions. The true absorption coefficient of the analyte can be found using the following equation:

Summary of ratiometric methods
Details of the configuration of the different techniques and calculation of the compensation parameters are summarised in Table 1 using similar nomenclature for each. For each of the multiple beam measurements, it is necessary to control the ratio of Φ 11 to Φ 12 so that the detector fluxes for the short (e.g. L 11 ) and long (e.g. L 12 ) paths are measured independently of each other. This is achieved in our experiments by using a narrowly diverging beam such that a considerable proportion of the incident beam (30-40%) is directed to the short path detector. As a result, the diffuse (long) path flux will be negligible in comparison with the detected short path flux. A sufficient proportion of the incident beam encounters the sphere wall so that the radiant flux in the diffuse path is detectable, i.e. above the detector noise level.
The first strike spot thus represents a beamsplitter element. Light striking the detector window proceeds (mostly) through that window, and light striking the diffusely reflecting annulus around the window enters the multiply reflected path of the integrating sphere. In none of the cases summarised in Table 1 can the performance of the annulus be compensated. The beamsplitting process could be configured differently, for example using a partially reflecting mirror / window over the detector. Absorbing dirt on the window would affect both paths equally, but scattering dirt could not be compensated. This is a disadvantage of both schemes.
Nevertheless, the schemes have value for real integrating spheres. They compensate for changes to the reflectivity of the inner surface of the sphere. Such changes are multiplied in their effect on the measured absorption coefficient by a factor of M, the average number of times that the light is reflected by the sidewalls, increasing the possible error where compensation is not provided. Any uncorrected changes to the detector windows or beamsplitter elements are multiplied only once. Thus, for small changes in sphere reflectivity, resulting errors from this lack of compensation are likely to remain small. Additionally, either of these compensation schemes moves the potential source of residual error from the inner sidewalls to more easily accessible elements located on sphere ports, which may be removed for cleaning or calibration.

Experimental method
Our system was tested using tunable diode laser spectroscopy of a methane absorption line at 1651nm. For simplicity, the laser wavelength was scanned across the gas line by using a sawtooth current, to give a direct measurement of the gas absorption spectrum. Improved signal to noise ratios can be obtained using 2f WMS, however at higher concentrations the integrating sphere transfer function can distort the measured gas lineshape, leading to apparent errors [25].
The experimental configuration is shown in Fig. 2. The integrating sphere (Thorlabs IS200-4) was made from Zenith material (a bulk diffuse reflector made from sintered PTFE), with a specified reflectivity of 98.7% at 1650nm, and had an internal diameter of 5.08cm. It was modified for gas detection using one source and two detectors, the first detector within the first strike spot and the second at right angles, recessed so as not to encounter direct rays from the first strike spot. Additional ports of diameter 1.0 and 0.5mm were used for gas entry and exit. For calibration purposes, a conventional reference gas cell was used, with a single known pathlength of 114.5 ± 0.1cm, such that both the integrating sphere and the conventional cell were fed the same test gases.
A 1651nm distributed feedback (DFB) singlemode fibre-pigtailed laser (NEC NLK 1U5EAAA) was used, with a slightly diverging output controlled using an aspheric lens (Thorlabs C280TM-C). The laser was operated with a current driver (Thorlabs LDC202) using a DC current of 110mA. To modulate the wavelength, a signal from a function generator (Hewlett Packard HP33120A) provided, via the driver, an additional sawtooth current of frequency of 1kHz and magnitude of 40mA p-p. This provided a wavelength scan of 0.28nm (31 GHz), confirmed using an optical spectrum analyser (Yokogawa AQ6370c).
Signals were collected from two photodetectors with variable gain (Thorlabs PDA10CS), the detector directly opposite the source aperture (D1) used at low gain (0dB) and the detector at right angles (D2) used at high gain (50dB) because of the low throughput of the sphere. Raw signals were recorded using an oscilloscope prior to data processing.
The system was tested with different concentrations of methane in synthetic air, in the range 0 to 6250ppm. Gas from certified cylinders (Scott Specialty Gases) containing methane (1010ppm and 2.5% volume) was further diluted by mixing with synthetic air using a bank of mass flow controllers (Brooks GF40 with Brooks 0254 control unit), with a total gas flow rate of 1000sccm (standard cubic cm / minute) for all measurements. The synthetic air used was certified to contain total hydrocarbons of <0.1ppm. Figure 3(a) and (b) show example readings respectively from D1 and D2 on the sphere, following conversion of signals in Volts to power in Watts so that the absolute levels can be compared for the two detector positions. Fig. 3(c) and (d) show the transmission for D1 and D2 respectively, normalised to the signal recorded in the absence of gas. Data for D1 is presented only for zero gas and 6250ppm, for clarity. Assuming that D1 and D2 sampled the same level of multiply reflected light, the absolute signal levels in Watts confirm that any multiply reflected light reaching D1 must have been only 0.3% of the total power received by D1. Therefore, D1 would be substantially unaffected by the throughput of the sphere. Further evidence for this is that the level of absorption exhibited in the D1 readings is consistent with a single pass of approximately 5cm.
A one-time calibration of the equivalent pathlength of the sphere was performed by moving both detector D2 and the output of the fibre pigtail connected to the DFB laser so as to direct a collimated beam through a reference cell of known pathlength (114.5 ± 0.2cm). The normalised absorbance at a gas concentration of 1010ppm was then compared with results from the sphere for the same concentration. Fig. 4(a) shows the normalised transmission for the gas calibration cell and Fig. 4(b) shows the same transmission for D2 connected to the integrating sphere.
Data analysis was performed as follows. For each of the recorded signals, the zero baseline was inferred by using the regions on either side of the gas line. The raw data was then normalised to absorbance as shown in Fig. 3(b). For simplicity, we used the depth of the normalised transmission at the gas line centre as our measure of gas concentration. A line fit might have produced a more accurate measurement with better signal to noise ratio, however we were not expecting any significant changes in gas linewidth during the experiments, and calibration was provided using the single pass gas cell using the same gas at the same pressure.
To simulate contamination of the sphere surface, we needed an absorbing material that could be applied to the inner surface of the sphere in a repeatable manner, and removed without degradation of that surface. We previously developed small adhesive tabs, fabricated from black PVC insulation tape, with dimensions approximately 5 × 9mm [19]. As shown in Fig. 5, these included a round handle made from the same tape, which enabled placement inside the sphere using tweezers inserted through a sphere port. These "fouling tabs" could be placed against the inner surface of the sphere to simulate contamination.   It is possible that the fouling tabs might have left a permanent residue that affected sphere reflectivity over time, despite being applied with the minimum force needed to secure them in position. We did not see a significant deterioration in sphere pathlength for multiple experiments completed (testing this method and others) over a period of approximately 12 months. We would, however, expect that a thin organic residue would have a much lower impact on reflectivity at 1651nm than a black tape. Figure 6 shows the measured change in Φ 11 and Φ 12 as a function of the area of applied contamination. Because the level of absorption provided by the tabs was strictly unknown, we have expressed the results as a function of the area of sphere surface covered by the tabs, in the range 0 to 3%. Later in Fig. 9 we assess the performance of these tabs. As expected, the value of Φ 11 showed only a small decrease with concentration, reflecting the absorption for a single pass across the gas cell, but no systematic change with the level of sphere contamination. Φ 12 showed a large decrease in the signal level with increasing levels of contamination.

Results
The expansion of Φ 11 in Fig. 6(b) reveals a mean proportional repeatability of ±0.13% when signal values for different levels of fouling are compared with the unfouled state. Since these measurements should not have been significantly affected by the fouling tabs, this acts as a measure of the repeatability of this parameter overall. Fig. 6(b) also confirms that there is no measurable systematic change in Φ 11 with the degree of fouling, and thus that these measurements were not unduly influenced by multiply reflected light. By comparing repeated estimates of the line centre at zero gas, we estimate a higher repeatability for Φ 12 of ±0.3%. Both Φ 11 and Φ 12 were sensitive to imperfect estimation of the zero baseline at the gas line centre, as might be expected. Comparing estimates taken at different gas concentrations with the true level measured at known zero gas revealed a repeatability of ±0.4% for Φ 11 (0) and ±1.5% for Φ 12 (0). Figure 7 then shows the resulting values of Q(0), according to equation (13), and Q(α). At each concentration, differences in the values of Q(0) at each concentration were small, therefore the average has been shown in Fig. 7(a) and the residuals for each concentration in Fig. 7(b). Inspection of Fig. 7(b) suggests that there is no systematic change in Q(0) with gas concentration. This is not surprising, since Q(0) is based on transmission measurements made in the non-absorbing baseline region adjacent to the gas line, and should therefore be unaffected by the gas concentration. The RMS residual in Q(0) shows an increase with the level of fouling, from ±0.1% at zero fouling to ±0.5% at maximum fouling. From the errors deduced from data in Fig. 6, we would expect the RMS residual in Q(0) to be higher, at ±1.6%. This suggests that some of the errors in Φ 11 (0) and Φ 12 (0) were correlated and have cancelled out. Using these measurements, the value of L foul was estimated according to equation (17). The value of L cal was determined by measuring the gas absorption within the integrating sphere with no contamination and comparing this to the reference gas cell; this gave a value of L cal = 99.2 ± 0.4cm. The results for different levels of sphere contamination are shown in Fig. 8(a) as an average over all the gas concentrations used in the study. For a small level of contamination of the sphere wall of only 0.62% coverage by black tape, the pathlength was reduced by 25 cm or over 25%, a significant change. The residual differences from the mean are plotted for each gas concentration separately in Fig. 8(b) and indicated that there was no apparent systematic change in the effective sphere pathlength with concentration, as is expected from the previous results. The residuals in Fig. 8(b) are the same proportion of L foul as those in Fig. 7(b) are of Q(0), as expected from equation (17), therefore the same comments on errors apply. Figure 9 shows the associated values of M for the integrating sphere, calculated from the values in Fig. 8, and the reduction in the mean surface reflectivity, ρ 0 , calculated using equation (5). A linear relationship between fouling tab area and the reduction in ρ 0 suggests that the fouling tabs were acting as intended.
The ratio of fouling tab area to reduction in ρ 0 was approximately 1.7, i.e. the tabs were projecting a 70% greater absorbing area than the physical area in contact with the sphere. There are two possible contributors to this. Firstly, the "handle" on top of the tab would provide additional projected absorbing area. Secondly, it is possible that the tabs might present a shadow, absorbing photons that had entered the reflective sidewall to one side, and that were absorbed on their path out of that material. As mentioned before, for this type of bulk reflector material the photons can penetrate up to 10mm into the material before exiting back out, and in this process can also migrate sideways by a similar amount via a random series of scattering events. The magnitude of any shadowing effect would therefore depend on the ratio of tab dimensions to mean penetration distance.
The estimated pathlength from Fig. 8 was used to compensate the gas measurements made at the line centre. Measured absorption coefficients α were calculated by rearrangement of equation (18), using L 12 (0) for uncompensated measurements and L foul for compensated measurements. The results are shown in Fig. 10(a) and (b) for the uncompensated and uncompensated cases respectively. The errors in α have been calculated by assuming that the values at zero fouling are correct, and are shown in Fig. 10(c) and (d). Their associated proportional errors are shown in Fig. 11.   For completeness, in Fig. 11 we also compare the results for four-beam compensation using the same experimental geometry, as previously reported by the authors [19] . To ensure that the results were directly comparable in terms of effective pathlength, there were no changes in the experimental arrangement, i.e. in all cases there were two source ports and two detectors installed on the sphere, and the pathlength L 12 was identical for both the four-beam and two-beam measurements.
If we were to assume that the integrating sphere's pathlength remained constant through the experiments, with no compensation, the resulting error shown in Fig. 11(a) would be significant, in the range −57% to −65% for the most severe level of contamination. In contrast, the two-beam compensation scheme reduced this to between +11% and −10%. The error was worse for the highest gas concentration, but more reasonable (below 4%) for lower concentrations up to 2.5% wall fouling.
Why might we see errors at this level? Errors in Q(0) in Fig. 7(b) are between ±0.1% at zero fouling and ±0.5% at maximum fouling, and translate to the same proportional errors in L foul . We might reasonably expect errors in Q(α) to be at a similar level, though we have no direct confirmation. Therefore, via equation (18), the error might contain a contribution from the nonlinearity of the integrating sphere's response and our application of the Beer-Lambert law. We know that at higher concentrations, in the region where the Beer-Lambert law becomes nonlinear, the integrating sphere's effective pathlength is shortened by the absorbance of the analyte [26], and for simplicity this was not corrected in our study..
Would any nonlinearity in detector responses lead to problems with the compensation technique, since the measured light levels cover three orders of magnitude? The results for received power in Fig. 3 were calculated from signal voltages using the manufacturer's responsivity and transimpedance gain at each setting, and we used the photodetectors at much lower (<10%) output voltages than the saturation voltage of the amplifier. But even if the gain was incorrect, the final corrected values are compared with calibration measurements taken with the same photodetectors. The photodetectors should be linear over the range within which they are each required to operate.
For the lower concentrations, the error showed a marked deterioration above 2.5% surface area fouling; our previous work leads us to suspect that at such high levels of contamination the integrating sphere relations may start to break down at this level [19]. The 4-beam technique might provide a more balanced correction when the intensity within the sphere the sphere becomes less symmetrical under these conditions. For the lower two gas concentrations and all other levels of contamination, errors were much reduced, within the range ±4%. Errors were lower across the board for the four-beam compensation scheme (within the range 0 to 9%), which might partly be a result of the additional averaging over multiple measurements, and might also result from that scheme's overall superiority in providing compensation.

Discussion and conclusions
Ratiometric methods have been developed to provide in-situ compensation for changes to the optical pathlength when using integrating spheres as gas cells. Such changes can potentially arise in use, as a result of fouling or degradation of the sphere surface. Because the equivalent pathlength is a sensitive function of sphere reflectivity, the effects on pathlength calibration can be large for even small changes to the mean reflectivity. For example, covering only 0.62% of the sphere wall with a black tape resulted in a 25% reduction in the sphere pathlength. Levels of coverage of simulated contamination were used in the range 0 to 3% of sphere wall area, a range intended to exaggerate the degree of fouling and the associated effect on sphere performance, leading to a reduction in effective pathlength of over 50%.
Two methods have been introduced that have the potential to improve calibration accuracy by an amount that depends on both the degree of fouling present and the absorbance of the target. The first technique, referred to here as four-beam, was introduced in a previous paper [19] and the results presented here as a performance benchmark. The second technique, referred to here as two-beam, is introduced in this paper. Tests have shown that it can provide a significant improvement in calibration accuracy. For the most severe fouling corresponding to 2.9% wall coverage, the technique reduced the error from 55-65% to within ±11%. It is suspected that the dependence on gas concentration may be a result of uncorrected nonlinearity within the cell that follows from the Beer Lambert law. For levels of fouling up to 2.3% and at the two lower concentrations, the technique reduced the error from over 50% to within ±4%. We suggest that such results may be more representative of the regime within which an integrating sphere might be used. Whether larger errors are acceptable will depend on the application; if errors of ±11% are considered too high, the correction factor may be used as a warning that the instrument is operating outside its specification.
The four-beam technique showed superior compensation to the two-beam technique, however it has the disadvantages of requiring multiple sources and difficult alignment. The latter issue potentially negates one of the key advantages of integrating spheres: that they are easy to align when setting up, and that alignment is easy to maintain in use. The two-beam technique shows less of an improvement to calibration accuracy, but we have found it easier to implement. Alignment is restricted to ensuring that suitable proportions of light fall on each of the measurement and reference paths; we have configured the reference detector within the sphere, but it could equally have been located externally and the two beams generated using a conventional beamsplitter. Finally, the two-beam technique requires only one source (if configured with two detectors) or only one detector (if configured with two sources), simplifying the system. Reducing the number of ports by one would also act to increase the effective pathlength of the sphere, though this advantage was not demonstrated in our study because of the decision to maintain comparability with our previously published four-beam system.
Although the two-beam technique cannot account for fouling of certain components such as the detector windows, it still accounts for sidewall fouling, where any degradation is multiplied by a value equal to the sphere multiplier, M. Thus, if fouling is more or less homogeneous (as may be expected if it results from light condensation or small dust particles), wall fouling may be more significant than window fouling (by a factor of M). We would however advocate that windows should not be placed at the bottom of the sphere, since significant condensation or larger particles are more likely to fall to rest there than in other locations. Neither technique can account for changes in the so-called beamsplitter elements, which in our configurations were the portion of the sphere illuminated by the first strike spot.
Both techniques required that the received power corresponding to a single pass across the sphere, from D1 in this paper, is much larger than the received power corresponding to multiply reflected light, from D2 here. Otherwise, a systematic error would arise in the level of D1, which would be affected by the mean reflectivity of the sphere. The question arises, whether this could also be achieved for integrating spheres with much larger values of M (and therefore higher throughput) as have been developed by Cone et al. [18], since the power received by D2 would be around a factor of 10 higher. In principle it would still be possible to reduce the light intensity at D2 by further collimating the beam incident on the first strike spot, but this would have the disadvantages of (i) being harder to align, and (ii) making the "beamsplitter elements", which we can't correct for, more susceptible to the effects of random spot fouling, as they would integrate over a smaller area. There are two possible solutions to this. Firstly, the reference detector D1 may be placed outside the sphere, resulting in no correction for the entry window (but a clean beamsplitter). Secondly, for spheres with a much longer pathlength there may be less need for a ratiometric calibration scheme, since longer pathlengths are easier to measure than shorter pathlengths with high precision using the ringdown technique, as demonstrated by Cone et al. [12]. The user can choose whichever scheme presents the most acceptable compromise.
In summary, a new technique, referred to as a two-beam configuration, has been presented to provide compensation for the change in pathlength calibration of an integrating sphere when subject to contamination of the sphere wall. The technique can be used in-situ and is ratiometric, therefore places no special requirements on source modulation frequencies or the bandwidth of detection systems. The integrating sphere relations are used to associate the sphere throughput with its pathlength, which is then compensated when making absorption measurements. Tests have demonstrated this technique's performance when using a single source and two detectors, and there is no reason to suppose that it would not also work when configured with two sources and one detector.