text:
Journal cover Journal topic
Atmospheric Measurement Techniques An interactive open-access journal of the European Geosciences Union
Journal topic
Atmos. Meas. Tech., 12, 5829–5844, 2019
https://doi.org/10.5194/amt-12-5829-2019
Atmos. Meas. Tech., 12, 5829–5844, 2019
https://doi.org/10.5194/amt-12-5829-2019

Research article 07 Nov 2019

Research article | 07 Nov 2019

# Performance of a new coaxial ion–molecule reaction region for low-pressure chemical ionization mass spectrometry with reduced instrument wall interactions

Performance of a new coaxial ion–molecule reaction region for low-pressure chemical ionization mass spectrometry with reduced instrument wall interactions
Brett B. Palm1, Xiaoxi Liu2, Jose L. Jimenez2, and Joel A. Thornton1 Brett B. Palm et al.
• 1Department of Atmospheric Sciences, University of Washington, Seattle, WA, USA
• 2Department of Chemistry and Cooperative Institute for Research in Environmental Sciences, University of Colorado, Boulder, CO, USA

Correspondence: Joel A. Thornton (joelt@uw.edu)

Abstract

Chemical ionization mass spectrometry (CIMS) techniques have become prominent methods for sampling trace gases of relatively low volatility. Such gases are often referred to as being “sticky”, i.e., having measurement artifacts due to interactions between analyte molecules and instrument walls, given their tendency to interact with wall surfaces via absorption or adsorption processes. These surface interactions can impact the precision, accuracy, and detection limits of the measurements. We introduce a low-pressure ion–molecule reaction (IMR) region primarily built for performing iodide-adduct ionization, though other adduct ionization schemes could be employed. The design goals were to improve upon previous low-pressure IMR versions by reducing impacts of wall interactions at low pressure while maintaining sufficient ion–molecule reaction times. Chamber measurements demonstrate that the IMR delay times (i.e., magnitude of wall interactions) for a range of organic molecules spanning 5 orders of magnitude in volatility are 3 to 10 times lower in the new IMR compared to previous versions. Despite these improvements, wall interactions are still present and need to be understood. To that end, we also introduce a conceptual framework for considering instrument wall interactions and a measurement protocol to accurately capture the time dependence of analyte concentrations. This protocol uses short-duration, high-frequency measurements of the total background (i.e., fast zeros) during ambient measurements as well as during calibration factor determinations. This framework and associated terminology applies to any instrument and ionization technique that samples compounds susceptible to wall interactions.

1 Introduction

Trace gases in the atmosphere are drivers of the chemistry that determines air quality and climate effects (Seinfeld and Pandis, 2006), as well as oxidant budgets and oxidation pathways (e.g., Crutzen, 1979; Di Carlo et al., 2004) and secondary organic aerosol (SOA) formation (Shrivastava et al., 2017). Trace organic compounds are particularly complex, spanning more than 15 orders of magnitude in volatility (Donahue et al., 2012; Hunter et al., 2017; Isaacman-Van Wertz et al., 2018). Large gaps remain in our knowledge of the chemistry and impacts of trace organic gases, in particular the lower-volatility compounds (Goldstein and Galbally, 2007). The ability to measure and quantify such lower-volatility gases is an evolving analytical measurement challenge but remains a limiting factor in our ability to test important theories governing, e.g., organic gas–particle partitioning, oxidation mechanisms, SOA formation, vertical distributions, and dry deposition.

Many of the recent advances in knowledge of atmospheric trace gases, particularly the lower-volatility compounds in the gas phase, have been due to the application and development of advanced instrumentation (Mohr et al., 2013; Ehn et al., 2014; Isaacman et al., 2014; Krechmer et al., 2016a; Peng et al., 2016; Yuan et al., 2017). One of these major advances has been the development of field-deployable mass spectrometers, combined with the development of specialized inlets allowing the application of various chemical ionization methods to atmospheric compounds (Ehn et al., 2014; Lee et al., 2014; Krechmer et al., 2016a). In chemical ionization, analyte molecules are imparted an electrical charge either by charge transfer from or clustering with a reagent ion, processes which are relatively low energy and typically induce little fragmentation of the analyte molecules. A variety of reagent ions with the ability to ionize different subsets of analyte molecules have been used, including H3O+, acetate, iodide (I), nitrate (${\mathrm{NO}}_{\mathrm{3}}^{-}$), ammonium (${\mathrm{NH}}_{\mathrm{4}}^{+}$), and others (e.g., Jokinen et al., 2012; Yatavelli et al., 2014; Zaytsev et al., 2019). Iodide-adduct ionization in particular has been used for both gas and particle composition measurements and is sensitive to a wide range of inorganic and organic molecules (e.g., Huey et al., 1995; Le Breton et al., 2012; Lopez-Hilfiker et al., 2014; Mohr et al., 2013; Lee et al., 2014, 2016; Veres et al., 2015; Gaston et al., 2016).

One impediment to the measurement of lower-volatility gases is the influence of inlet tubing and other experimental apparatus surfaces. Several recent experiments have probed the effects of Teflon chamber walls on experimental processes (Matsunaga and Ziemann, 2010; Krechmer et al., 2016b, 2017; Huang et al., 2018). A variety of organic and inorganic gases have been shown to reversibly absorb into Teflon (and other polymer) tubing or reversibly adsorb onto the surface of a variety of solid materials including stainless steel (Pagonis et al., 2017; Deming et al., 2019; Liu et al., 2019). Current chemical ionization mass spectrometry (CIMS) instrumentation typically requires the use of such materials in the design of the inlet tubing as well as the ion–molecule reaction (IMR) region where chemical ionization occurs, which allows for wall interactions to occur. The rates of flux of analyte molecules to and from these wall surfaces can depend on complex factors of water vapor concentration, coanalyte concentrations, etc. (Pagonis et al., 2017; Deming et al., 2019; Liu et al., 2019), leading to difficult interpretations of data that are often not consistent across different studies.

Past CIMS IMR versions have employed different designs, typically constructed from varying fractions of stainless steel and several types of Teflon (Eisele and Tanner, 1993; Jokinen et al., 2012; Lee et al., 2014, 2018; Zhao et al., 2017). Some IMR designs, such as the ${\mathrm{NO}}_{\mathrm{3}}^{-}$ CIMS, can operate at ambient pressure with an IMR design that essentially eliminates wall interactions (e.g., Krechmer et al., 2015). However, the ${\mathrm{NO}}_{\mathrm{3}}^{-}$ reagent ion is sensitive only to a narrow subset of highly oxidized molecules with which it has clustering strengths greater than its cluster with HNO3. The I CIMS technique is sensitive to a much broader range of analyte molecules, making it a powerful technique for studying atmospheric chemistry. But, I can also cluster with one or more water molecules, causing the sensitivity of I toward other analyte molecules to be dependent on water vapor concentrations in the IMR. To reduce this water vapor dependence, the IMR is typically operated at low pressure (∼2–200 Torr) to reduce the partial pressure of water vapor. For aircraft I CIMS measurements, a low-pressure IMR has also been desired in order to allow pressure control systems to maintain constant pressure in the ionization region with changing pressure/altitude, thus maintaining constant sensitivity to clustering (Neuman et al., 2002; Crounse et al., 2006; Le Breton et al., 2012; Lee et al., 2018). In order to operate at low pressure, the I CIMS must sample through an orifice, necessitating wall interactions in the IMR. Accounting for the flux of analyte from the IMR walls is a challenge of particular importance to aircraft measurements, where ambient concentrations can change rapidly on the edges of spatially narrow plumes from point or regional sources such as power plants, biomass burning, or urban areas. Background measurement and subtraction from the total observed signal is typical (Neuman et al., 2002; e.g., Crounse et al., 2006; Veres et al., 2008; Lee et al., 2018); however, a uniform standard method for background subtraction does not exist, and methods applied by different research groups vary widely.

In this work, we present a new design of a coaxial, low-pressure IMR to minimize wall interactions, incorporating knowledge acquired in the operation and analysis of past IMR designs. A detailed consideration of the process of sampling through an instrument inlet is presented, explaining how the measured signal is influenced by wall interactions. We suggest practices for accounting for wall interactions, both in experimental measurements and when performing calibration measurements that will be later applied to experiments. Finally, this new IMR design was characterized by measuring the magnitude of wall interactions of several organic compounds spanning a wide range of volatility. Both the new IMR design considerations and the broader discussion of wall interactions will be applicable to a broader community of analytical atmospheric chemistry.

2 Coaxial low-pressure IMR design

## 2.1I− CIMS method

Iodide-adduct chemical ionization has been described in detail in previous studies (Huey et al., 1995; Lee et al., 2014, 2018). Briefly, I anions are produced by passing methyl iodide (CH3I) in nitrogen through alpha particles from a polonium-210 radioactive sealed source. The anions form adducts by colliding with neutral analytes inside an IMR, and the clusters are subsequently sampled by a high-resolution time-of-flight mass spectrometer (HR-ToF-MS; Tofwerk AG, Thun, Switzerland). This spectrometer provides a nominal mass resolving power (m/Δm) of approximately 5000 with parts per trillion by volume (pptv)-level detection limits for most compounds.

## 2.2 IMR description

Many different IMR designs have been employed in past CIMS measurements, each with advantages and disadvantages. The primary function of any IMR region in a CIMS is to facilitate the process of imparting an electrical charge onto analyte molecules in the sample air, whereupon they can be manipulated and analyzed inside the mass spectrometer. Depending on which reagent ion is chosen and which analyte molecules are targeted, the IMR will have different design requirements. Recent interest in identifying and quantifying a broad range of reactive and/or low-volatility compounds presents substantial challenges for CIMS instruments with low-pressure ionization regions, including but certainly not limited to the I CIMS used in this work. The effects of IMR wall interactions can be a substantial impediment to making accurate and easily interpretable measurements of compounds that react on or reversibly partition to reactor walls.

Figure 1Schematic of the new, coaxial, low-pressure IMR design for CIMS. This is a two-dimensional cross section of the cylindrical IMR along the axis of flow, and it is not to exact scale. Black lines represent stainless steel surfaces, green and blue lines represent PTFE Teflon, and red/yellow lines represent FEP or PFA Teflon. Constant mass flow into the IMR is controlled using a variable orifice. Water vapor can be added through a port in the orifice plate, in order to keep the environmental conditions in the IMR more constant. The sample flow and ion flow are passed through laminizer elements to limit the effects of turbulent diffusion to the IMR walls. Ion–molecule adducts are formed via diffusive mixing in the drift region. The ability to enhance the mixing of ions into the sample flow by applying an electric field between the drift region wall and the exit of the sample flow laminizer was also included (not shown) but led to only modest enhancement and was not used in the measurements presented herein. A mirrored pumping scheme also prevents turbulence and limits the effects of wall interactions. Adducts are sampled through a capillary into the time-of-flight mass spectrometer.

Herein we describe the design of a new coaxial IMR, illustrated in the schematic in Fig. 1. This design aimed to improve upon that most recently employed by the Thornton research group during the WINTER 2015 research flights, which has been described in detail in Lee et al. (2018). That version was itself a design built to improve upon the characteristics of previous versions of the IMR including the model available commercially from Aerodyne Research Inc. with the mass spectrometer (Kercher et al., 2009; Bertram et al., 2011; Lee et al., 2014). In the commercially available low-pressure IMR, the analyte flow and ion flow are mixed via turbulence inside a region constructed out of stainless steel. In addition to the increased wall interactions that result from turbulence, stainless steel has been shown to suffer from enhanced wall effects for many compounds (Deming et al., 2019; Liu et al., 2019). The WINTER IMR made improvements by decreasing the wall surface area and residence time of the turbulent region, and also by constructing two of the three walls of the cylindrical IMR region out of machined PTFE Teflon (Lee et al., 2018). However, the third wall remained stainless steel, and turbulence remained an issue.

The main goals of our improved IMR design were to reduce wall effects while maintaining sufficient residence time for clustering (i.e., maintain sufficient sensitivity). The initial strategies were to remove as many wall surfaces as possible and have any necessary wall surfaces be constructed from materials such as perfluoroalkoxy (PFA) Teflon, which have been shown to have the weakest interactions with many analytes (Pagonis et al., 2017; Deming et al., 2019; Liu et al., 2019). To minimize wall effects further, we aimed to inject the sample flow into a coaxial sheath of ion flow, creating a larger distance between analyte and surfaces. This design feature was similar to what has been used in some previous IMR designs, in particular for the ${\mathrm{NO}}_{\mathrm{3}}^{-}$ reagent ion (Eisele and Tanner, 1993; Jokinen et al., 2012; Massoli et al., 2018). Furthermore, we aimed to pump the flow out of the IMR in a similar manner to how it was injected, pumping a sheath flow radially outside of a sample flow. Any analyte that desorbed from a wall surface would be more likely pumped out in the sheath flow and not sampled into the MS.

The final design requirement was that the IMR was capable of operating at a constant IMR pressure on an aircraft platform, where ambient pressure can span the range from ∼200 to 760 Torr. Ion–molecule reaction rates scale with total analyte number density, and ion–molecule cluster stability will depend on total pressure as well as H2O partial pressure (Lee et al., 2014; Iyer et al., 2016; Lopez-Hilfiker et al., 2016). Thus, maintaining constant pressure (and temperature) can minimize changes in instrument response with large changes in altitude. This feature was added to the WINTER version of the IMR by incorporating a variable orifice on the upstream side of the IMR (Lee et al., 2018), and it is also included in this new coaxial IMR. As long as the pressure downstream of the orifice remains roughly less than half of the pressure of ambient air upstream, critical flow is achieved in the orifice (i.e., the speed of the air through the orifice is approximately the speed of sound). The mass flow through the orifice is then only a function of upstream pressure. As upstream pressure changes with altitude, the variable orifice can be opened or closed via computer control to maintain constant mass flow into the IMR. As the pumps maintain constant mass flow out of the IMR, the pressure inside the IMR remains constant at ∼70 Torr downstream inside the IMR where I is introduced and ionization occurs.

The benefits of constant reduced pressure, e.g., stable instrument response and reduced effects of water vapor on ionization efficiency, come with enhanced wall interactions which can contribute potentially large and often poorly understood artifacts to the measurement. The pressure drop between ambient pressure and ∼70 Torr leads to a high-velocity jet expansion, which induces turbulent mixing. The jet-induced turbulence ensured mixing of reagent ions and sample flows in previous IMR designs but also enhanced contact of the sample flow with IMR surfaces. Moreover, the low pressure leads to an-order-of-magnitude-larger diffusivity compared to ambient pressure, such that, even in the absence of jet-induced turbulence, gases in the sample flow will randomly reach the walls of the IMR more efficiently than at typical ambient pressures. Consistent with these ideas, it has been previously shown that the low-pressure IMR is the main source of instrument memory and reactive trace gas losses, not the ∼0.5 m long sampling inlet at ambient pressure with fast (∼10–20 slpm) flow rates typically used (Lee et al., 2018).

Given the above considerations, the first design challenge was to slow the sample flow rate down by expanding the flow cross section while limiting turbulent mixing of analyte molecules to wall surfaces. In order to expand the flow without causing turbulence, an expansion cone/diffuser with an angle of less than approximately 5–7 could be used. Fluid dynamics simulations have shown that this method can prevent flow separation that leads to turbulence in expansions, though possibly not for the Reynolds numbers of less than 2000 in this IMR (Sparrow et al., 2009, and references therein). This cone angle would require a length of more than 13 cm. Diffusion calculations suggest that one-third of the analyte would contact the diffuser wall surface under laminar conditions, which still requires getting the flow laminar after the orifice. Given these considerations, as well as time constraints prior to a field campaign, we opted not to test a conical diffuser at this time. Instead, the jet of air exiting the orifice was allowed to expand immediately into a fluorinated ethylene propylene (FEP) Teflon-lined cylinder with 1.2 cm diameter and 1 cm length, after which it passed through a parallel cluster of 3.175 mm OD, 1.5875 mm ID (0.125 in. OD, 0.0625 in. ID) PFA Teflon tubes with a length of 1.5 cm. Turbulence was limited to the 1.2 cm diameter cylinder, and then the subsequent tubing cluster acted to develop laminar flow. As a rough approximation, turbulent flow can be converted to laminar flow by passing through a tube with an entrance length that is 10 times its diameter (Çengel and Cimbala, 2014). This concept guided our design specifications. When the sample air exits the laminizer element, the flow has slowed down and become much less turbulent, mitigating the effects of walls downstream of that point. Since having an orifice upstream of the IMR effectively necessitates having some region of turbulence in contact with walls, this design strategy was aimed at limiting the residence time and amount of wall surface area in the region of the IMR that encountered turbulent sample gas. Future low-pressure IMR designs could aim to further minimize wall effects in this region directly downstream of the variable orifice.

While the sample gas enters the IMR through the orifice, the I anions are concurrently injected into a region of the IMR concentric with and outside of the sample flow laminizing element. The anions are produced by flowing dry N2 over a permeation tube containing methyl iodide and then through a polonium-210 radioactive sealed source, producing I. The ion flow experiences some turbulence when injected into the IMR and then passes through a parallel cluster of 6.35 mm OD, 3.175 mm ID (0.25 in. OD, 0.125 in. ID) PFA Teflon tubes with a length of 1.27 cm (0.5 in.) that act as a laminizer element. The flow coming out of both the sample flow laminizer and ion flow laminizer exits in the same plane and can be arranged to have approximately the same velocity in the axial direction. In this work, this was achieved by maintaining a constant 2 slpm sample flow and 3 slpm ionizer flow. As part of the process of designing the IMR with laminizers, fluid modeling simulations were performed to visualize the effects of turbulent vs. laminar flows. Two example cases are depicted in Fig. S1 in the Supplement.

The exit of the laminizers marks the start of the drift region in the IMR where interactions of analyte with I anions occur. Within the 3.49 cm (1.375 in.) ID, 3.81 cm (1.5 in.) long drift region, the I anions and analyte flows mix together via diffusion, possibly aided by some residual turbulence. The design also includes some exposed stainless steel surfaces on the drift region wall and at the exit of the sample flow laminizer and entrance of the sample pump flow tube, as far from the main sample flow as possible to limit wall interactions. These surfaces can be used to apply an electric field inside the IMR to attempt to enhance the mixing of ions into the sample flow. However, only modest total detected ion enhancements were measured when applying such electric fields. We hypothesize that the relatively high diffusivity at 70 Torr, as well as any residual turbulence, was dominating the flow mixing instead of the electric field forces in this particular design. Because of the only modest gains and in the interest of simplicity, all exposed metal surfaces were grounded together and electric fields were not employed during the measurements discussed herein.

Because the analyte molecules enter the drift region in the center, they would have to diffuse all the way across the ion flow to reach a wall surface. In order to be sampled after encountering a wall, they would also have to diffuse all the way back across the ion flow to the capillary into the mass spectrometer. To prevent any molecules coming from the drift tube wall being sampled, half of the drift tube flow was pumped out along the drift tube wall and away from the MS capillary. According to diffusion calculations, only 4 % of the analytes are predicted to encounter a wall in the drift region under laminar flow conditions, and a small fraction of those molecules would diffuse back to the center to be sampled, essentially removing the effects of the drift region walls. The other half of the drift region flow was pumped through an FEP Teflon-lined sample tube with ID of 2.18 cm (0.86 in.) and length of 5.08 cm (2.0 in.) and past the MS capillary, where it was subsampled into the mass spectrometer.

Limiting the interaction between analyte and wall surfaces also limits the possibility of the analyte undergoing chemical reactions on surfaces. To examine and quantify the improvements made in this design, we start with a comprehensive discussion of the origin and meaning of wall effects. Although wall interactions are not the only source of instrumental background signals, for semivolatile and low-volatility compounds they are often the dominant source of residual nonambient signal. The concept of background signal will be examined using laboratory measurements and further discussed in the context of ambient measurements and instrument response calibrations. The improvements will be assessed by comparing laboratory measurements made with this IMR to previous measurements from other IMRs and instruments.

3 The effects of instrument wall surfaces

## 3.1 Measuring and subtracting instrument background signal

In order to properly evaluate the new IMR design, we must first introduce a common framework that can be used to describe how inlet tube and IMR wall interactions originate, what their effects are, and how they can be understood. The CIMS experimental setup will be defined here as comprised of two parts: the sampling tube (i.e., inlet) which transports the analyte from the sampling location (outside of aircraft, inside chamber, etc.) to the IMR; and the IMR, where ionization occurs prior to entering the MS. The IMR is defined as part of the instrument. The background signal is typically measured by flooding the sampling tube and/or IMR with clean air or ultra-high-purity nitrogen (UHP N2). Subtracting the resulting background signal from the total signal measured while sampling ambient air is a common practice in atmospheric mass spectrometry. However, the exact definition and quantification procedure of the background can vary across different experimental configurations and analysis goals. The processes that lead to the background signal can also be dynamic and controlled by multiple factors.

The background signal can originate from molecules coming from either the sampling tube or the IMR. In many cases, the sampling tube can be designed such that its background effects are small relative to the IMR effects, e.g., by pulling a large flow through the inlet and subsampling into the IMR, thus minimizing inlet residence time and also diluting the flux from the walls into a large flow volume. Sampling at ambient pressure in the sample tube also minimizes diffusivity to and from the walls. The IMR walls have been shown to be the dominant source of background signal in previous field measurement setups (Lee et al., 2018), so this discussion will focus mainly on IMR background signal. The details and concepts discussed here of background signal sources and how to quantify them are not specific to the I CIMS IMR but can be adapted to other IMRs and ionization types as well as for sampling tubes. The concepts involved are illustrated in Fig. 2a and demonstrated using laboratory measurements in Fig. 2b, where a constant gas-phase concentration of nitric acid (HNO3) was injected into a short polytetrafluoroethylene (PTFE) Teflon inlet tube (∼20 cm length, 0.75 in. diameter, 20 slpm flow rate) and subsampled into the IMR in the sample flow for a specified amount of time. The effects of wall interactions in such an inlet are minor relative to the effects of wall interactions inside the IMR (as demonstrated in Fig. 2). The schematic in Fig. 2a and the following discussion applies mainly to analyte molecules that partition reversibly to the walls (or to thin films of water adsorbed on the walls, as is the case for HNO3; Liu et al., 2019) and for wall surfaces that allow for absorption such as Teflon varieties. Adsorbing surfaces such as stainless steel, and irreversible loss of analytes such as many radical species, will be discussed as exceptions.

Figure 2(a) Schematic illustrating how wall interactions affect the measurement of low-volatility or polar gases for several experimental conditions, and (b) example of the fast-zero method of background subtraction for the measurement of constant concentration of ∼2 ppbv nitric acid from a permeation tube. The times corresponding to each panel in (a) are labeled on the time series in panel (b). The bottom of panel (b) illustrates the benefits of performing frequent background signal subtractions as opposed to only subtracting the persistent background signal.

At the theoretical time t=t0 in Fig. 2, consider an IMR that has never previously sampled a specific analyte molecule in the sample flow. Prior to t0, there will be no signal at all from this analyte entering in the sample flow, and the only signal corresponding to that analyte will be defined here as the persistent background, due to electronic noise and other baseline signal sources such as the ion source or carrier flows. In the specific case of HNO3 in the Fig. 2b example, a substantial persistent background exists due to a source in the ion flow from the polonium-210 ionizer. Most analytes will not have such a persistent background. At t=t0, the analyte has entered the IMR and experienced one of the following two fates: (1) traveled directly from outside of the IMR to the detector in the gas phase without interacting with a wall surface (which may include bouncing off of a wall surface without interacting); or (2) absorbing in (or adsorbing on) a wall surface, where it remains for some amount of time longer than the residence time of the IMR before desorbing and being sampled to the detector. The fraction of analyte that follows each of these two paths will be a function of instrument design (i.e., what fraction of sampled air collides with a wall surface through turbulence or diffusion) and a function of the uptake and partitioning coefficients of each analyte on each wall surface type. The uptake coefficients themselves will be a function of the exact environmental conditions of the wall surfaces at the time of collision. These environmental conditions can modify the wall surfaces and change how gases are taken up into/on surfaces or change how they desorb from the surfaces.

The most influential surface modifier is often water. The analyte can behave differently depending on whether it encounters a bare Teflon or stainless steel surface under completely dry conditions, a surface coated in a monolayer of water under low-relative-humidity (RH) conditions, or a surface coated with a thick layer of water that causes an aqueous diffusion limitation to the analyte interacting with the actual surface. Liu et al. (2019) demonstrated that some polar compounds partition to walls as a function of their Henry's law constants during humidified conditions. This IMR design has the ability to add water vapor directly downstream of the variable orifice as in Lee et al. (2018). This maintains a relatively narrow range of water vapor concentrations in the IMR regardless of the sample air humidity, keeping the environmental conditions (and uptake/partitioning coefficients) in the IMR roughly constant. Surfaces can also be modified by other analyte molecules, which essentially act in competition for surface sites. This behavior has been observed for materials such as stainless steel that are dominated by adsorption to a limited number of surface sites (Deming et al., 2019). While absorbing materials such as Teflon have been shown to be modified by water, they appear to be insensitive to the amount of other analytes absorbed in the surface (Pagonis et al., 2017; Deming et al., 2019; Liu et al., 2019), at least at analyte concentrations relevant to the atmosphere and typical laboratory chamber experiments.

As soon as there are analyte molecules ad/absorbed on surfaces, there will be a flux of that analyte from the surface back into the sample/ion flow. The flux from the surface will be a function of the amount of analyte on the surface, as well as the environmental conditions such as temperature, humidity, and history (see above). Therefore, in the moments just after t=t0, e.g., t=t1 in Fig. 2, there will be a flux of analyte from the walls. We define this flux as the source for the dynamic background signal, which is separate from the persistent background signal. Any analyte that is entering the IMR at this time will continue to split between reaching the detector directly or absorbing into the walls first, at the same fractional rates. These fractional rates will be constant as long as the environmental conditions remain constant, and the rates will not be a function of the flux of that analyte coming off of the wall. At t=t1, the total flux into the IMR is greater than the total flux to the detector, and there is a net flux to the wall surfaces. As more analyte continues to enter the inlet and ad/absorb on the walls, the flux of analyte from the wall will continue to grow until a time comparable to t=t2 in Fig. 2. Any analyte that partitions irreversibly to the walls or desorbs as a different compound due to surface reaction would appear to have no flux from the walls and no dynamic background signal. Only the fraction of such an analyte that did not interact with the walls would be detected, potentially at much lower sensitivities than expected from ionization efficiency considerations (Lopez-Hilfiker et al., 2016).

At times equivalent to t=t2 in Fig. 2, the flux of reversibly partitioning analyte from the wall has grown to be equal to the rate of ad/absorption of the analyte to the wall. The wall system is now in steady state. The amount of analyte arriving at the detector is now equal to the sum of the analyte that did not interact with walls and the analyte that entered the IMR at some earlier time, interacted with a wall, and then desorbed to reach the detector. Because the flux from the walls is equal to the flux to the walls, the total flux to the detector is equal to the total flux of analyte that is entering the IMR at that time. That is, the total signal is the same as it would be if the analyte were introduced into an IMR completely absent of wall interactions. This condition is only true when the incoming analyte concentration and environmental conditions have remained constant for long enough to establish wall steady state. As shown in Fig. 2b, the only signal that stays constant during a constant concentration injection with wall interactions is the background-subtracted signal. The background signal and thus also the total detected signal change over time and are both non-deterministically related to the analyte concentration entering the inlet. This concept is critical for the time-dependent quantification of analyte in the sampled air and is also important for the determination and interpretation of calibration factors, as discussed later in Sect. 3.2.2.

The ratio of the background-subtracted signal to the background signal will remain constant after time t=t2, as long as the environmental conditions in the IMR remain constant. However, the ratio will not be the same for all analytes. For analytes which are more volatile (or less soluble in water), interact with the wall surfaces less strongly, and desorb more rapidly, the background signal may be negligible relative to the background-subtracted signal (and the background-subtracted signal will be essentially equal to total signal). For analytes which are less volatile (more soluble), interact strongly with surfaces, and desorb slowly, the background signal may become a large majority of the total signal at the detector and the background-subtracted signal may reach a detection limit. The IMR geometry and design will largely determine which compounds qualify as “more” and “less” volatile on this relative scale. For instance, the ${\mathrm{NO}}_{\mathrm{3}}^{-}$ CIMS and the cross-flow ion source (Zhao et al., 2010, 2017) which operate with laminar flows at atmospheric pressure in the IMR, thereby minimizing turbulence and diffusion to walls, both employ geometries that prevent sampling of any analyte that encountered a wall surface in the ionization region, leading to an IMR background signal flux that is essentially negligible. Atmospheric pressure sampling, which as noted above is ultimately the source of such benefits, may not be suitable for an aircraft platform as discussed above.

Continuing our description of the evolution of wall interactions, consider that the source of the analyte into the IMR is completely removed immediately following t=t2. For instance, this could represent the injection of analyte-free air during a background measurement, or a scenario where the sampled air transitions rapidly from high concentrations of the analyte in a plume to very low concentrations outside of a plume. There will be a short transition period, corresponding to the residence time distribution of air in the IMR downstream of where analyte-free air is injected (approximately 100 ms on average in the IMR described herein) plus any time for switching flows outside the ionization region (potentially several seconds), when the analyte-laden air is replaced with analyte-free air in the IMR. The flux of analyte to the detector without wall interactions and the flux of analyte to the walls both drop to zero at this point, which is specified as t=t3. There remains essentially the same amount of analyte ad/absorbed on the walls at t=t3 as at t=t2 immediately prior, so the flux from the wall to the detector continues to provide the same dynamic background signal.

After more time passes and t=t4 has been reached, the amount of analyte on the walls has been partially depleted since the wall system is now out of steady state. There is still a flux from the wall without a complementary flux to the wall to replenish the analyte. The flux from the wall is also lower at this time than at t=t3 because the concentration of analyte on the wall is lower. At a subsequent time long after t=t4, all of the analyte would eventually desorb from the walls, and the dynamic background signal from the inlet walls would reach zero, equivalent to a time t<t0. As discussed further in Sect. 3.3, the amount of time required for the dynamic background signal to decay to 10 % of the original signal (i.e., to near zero) can range from less than 1 s to tens of minutes or more, depending on the volatility of the analyte as well as environmental conditions and surface types. For some analytes (including HNO3 in the iodide anion source discussed here), there can be other persistent sources of background signal coming from the tubing and carrier gas related to the ion source. The persistent background is present at all times from t<t0 to t>t4 and can be quantified by injecting analyte-free air for sufficient time to completely deplete the dynamic background signal of interest here. The persistent background is also included in the signal measured during clean-air injections at t=t3.

The main goal of measuring and subtracting the background signal in an instrument is to ascertain the concentration of the analyte present in sampled air at the time of sampling with high temporal/spatial resolution, removing the instrumental artifacts related to the background signal caused by wall interactions. As illustrated in Fig. 2a, this task is often made complicated by the fact that the ratio of the background signal to the background-subtracted signal can vary widely during measurements. The entire signal could be due to background signal (as at t=t3), due to gas-phase signal (t=t0), or some dynamic mix of the two (t=t1 and t=t2). Even when all signal is coming from the background, the magnitude of the background can also change (t=t4).

Given these fluctuating factors combined with a potentially rapidly changing sampling environment due to a moving aircraft platform or rapidly shifting air masses with different source characteristics, the ideal way to determine the true concentration of the analyte in sampled air is to measure the amount of signal coming from the background sources at all points in time and subtract it from the total signal. But akin to Heisenberg's uncertainty principle, one cannot precisely measure both the total signal and the background signal at the same time. Instead, a practical method for determination of background signal is to measure the instantaneous flux of analyte off the walls using high-frequency, short-duration injections of analyte-free gas (typically UHP N2) interspersed among the normal measurement of total signal and then interpolate between these background measurements. This method is has been referred to as performing “fast zeros”. Upon injection of analyte-free gas, the measurement transitions from representing the total signal (equivalent to t=t1, t2, or t3, depending on whether wall steady state has been achieved) to a measurement of just the sum of dynamic and persistent background signals (equivalent to t=t3).

As seen in the inset of Fig. 2b, the decay of the analyte signal occurs in two parts (or more). The first part is the rapid exponential decay as the volume of the inlet is cleared out of any remaining gas-phase analyte, and stability of flows is achieved. The next part, which applies when the analyte is of relatively lower volatility or higher Henry's law constant into wall-adsorbed water, is the typically slower exponential decay that accompanies desorption of the analyte from the walls. There may be multiple decay constants with varying timescales (e.g., as illustrated in Krechmer et al., 2018) if there are multiple types of wall surfaces (e.g., both Teflon and stainless steel in the same IMR) or voids with different residence times. To know the background value at the time when the background measurement was initiated (t=t2), one needs to know the magnitude at which the slower exponential decay begins, i.e., the signal value at t=t3 shown in the inset of Fig. 2b. The background values determined at successive times of t=t3 are then interpolated to estimate the background at all points in time. Such periodic background determinations would also inherently account for any changes in the environmental conditions that would change the analyte uptake coefficient and thus the ratio of the flux to the walls vs. the flux to the detector without wall interaction, such as an aircraft platform flying through varying ambient H2O concentrations. In other words, as long as the background signal can be determined at a given time, it does not matter when those particular analyte molecules that led to background signal entered the IMR.

Any background measurement value taken at a later time, e.g., at t=t4 or at tt4 (a measure of the persistent background), would no longer represent the magnitude of the background at t=t2 and would underestimate the contribution of background signal to the total at the time the background measurement was initiated. This aspect is critical to the determination of so-called tails of measurements, e.g., when an aircraft platform is measuring in an analyte plume and then abruptly exits the plume to analyte-free air. The signal appears to decay as between t=t3 and t=t4 (and beyond) in Fig. 2b. The entirety of this signal is often due to background signal. If this background signal is not subtracted as described herein, the data would be falsely reporting a nonzero concentration (i.e., tail) of the analyte after exiting the plume, which could lead to large errors in measurement–model comparisons that would not be captured by simple uncertainties estimated by replicate calibrations. Note that when calculating the integral of signal across a plume pass, the same integrated concentration can be found whether or not the background signal subtraction method is used, provided that a self-consistent calibration value is applied (see Sect. 3.2).

With the IMR described in this work as well as previous versions, it was found that a fast-zero background measurement of 6 s duration was sufficient to pass through the fast exponential decay (which typically lasts ∼2 s) and capture t=t3 at the start of the slow exponential decay of analyte. The frequency at which the background measurement needs to be taken depends on the application. For measurement of rapidly changing analyte concentrations, the background needs to be determined as rapidly as possible to minimize errors in interpolation of the background. For recent aircraft measurements using this IMR, these 6 s background measurements were performed once per minute, striking a balance between minimizing background interpolation errors while maximizing the duty cycle of taking ambient measurements. One could imagine taking a 6 s background (or shorter, e.g., 4 s) as fast as every 20–30 s to capture extremely rapid changes in some specific circumstances, but information about the same temporal changes in background-subtracted signal would be lost. Conversely, if the analyte concentrations are known to be relatively constant, e.g., in a laboratory experiment, then the intervals between background determinations could stretch much longer without leading to substantial interpolation errors. Linear interpolation can be the simplest method; however, other methods could be used depending on specific circumstances. For instance, a relative-concentration-dependent interpolation may better describe the background signal for a case where a plume with large concentration gradient was entered and/or exited between background determinations.

## 3.2 Wall interactions and calibration of instrument response

The previous section discussed accounting for dynamic background signals in the context of determining accurate gas-phase concentrations in laboratory or field experiments. Also important is to account for the background signal during instrument response calibrations. When calibrating, a known amount of an analyte is injected into the instrument, and the amount of raw signal measured per unit analyte is determined. This raw signal has to be normalized to a constant number of reagent ions, given that the total number of ions created by an ion source (and thus clusters formed and signal measured) can change with time. Therefore, a calibration value for this I CIMS typically has units of counts per second per 1×106 total reagent ion count (TRIC) per part per trillion (ppt) of analyte, also called normalized counts per second (ncps) per ppt of analyte. When the raw signal in units of ncps is divided by the calibration value, a concentration in units of ppt is derived. The calibration value for each analyte must also be determined as a function of the amount of water vapor in the IMR.

However, in light of the earlier discussion of background signal, considering the signal as units of ncps is not enough information. The distinction between background-subtracted ncps and background (including dynamic and persistent background) ncps, which add to total ncps, is necessary. As illustrated in Fig. 2b, when a constant concentration of HNO3 (approx. 2 ppbv) from a permeation tube was added into the inlet, neither the background counts per second nor the total counts per second were constant functions of the amount of HNO3 injected. The background-subtracted counts per second were constant, making that value the only properly deterministic calibration constant that can be applied regardless of the relative amounts of background vs. background-subtracted signals. Therefore, it is also recommended that the same background subtraction be performed on both calibration data and field/laboratory measurement data. Also, care should be taken to ensure that wall steady state is achieved in any tubing that is used to transfer a calibration gas from its source to the IMR, such as in the PFA Teflon tubing between the HNO3 permeation tube and the IMR used in this work. This ensures that the flux of HNO3 coming out of that transfer line is the same as the calibrated flux out of the permeation device.

If background measurements are not performed or are not possible in a certain configuration, an alternative method may be used in specific circumstances. The calibration constant could be measured as the total ncps ppt−1 during a time equivalent to t=t2, when wall steady state has been achieved. This calibration constant represents the total (background-subtracted plus background) amount of signal that a given incoming gas-phase concentration will generate. It applies only at wall steady state, only when environmental conditions (e.g, RH) are the same as during calibration, and only in a given inlet configuration. Therefore, the calibration can only be applied to data that have not been background subtracted, and it will only be accurate when wall steady state has been achieved and environmental conditions are the same as during calibration. For laboratory measurements, these conditions may be achieved if special care is taken (e.g., flow tubes, oxidation flow reactors, or chambers operated in reproducible steady-state modes). However, dynamic conditions in field studies likely preclude this calibration method from being a routinely viable option for analytes with substantial background signal. The integral of signal across a plume would still be accurate (i.e., mass balance is achieved in the IMR), but the real concentration would be underestimated at the start of the plume and overestimated in the tail of the plume, provided that there are no signal tails from previous plumes still desorbing from surfaces. If sufficient background measurements were taken during a measurement period, but the calibration constant applied to that data was calculated using the total signal, the calibration constant can be retroactively converted to units of background-subtracted ncps ppt−1 by finding a suitable time when wall steady state was achieved during the measurement period. The ratio of background-subtracted signal to total signal during wall steady state can be derived and multiplied by the total signal calibration constant to obtain the background-subtracted calibration constant, using the following equation:

$\begin{array}{}\text{(1)}& \begin{array}{rl}& \frac{\text{Background-subtracted ncps}}{\text{ppt}}=\frac{\text{Total ncps}}{\text{ppt}}\\ & ×\frac{{\text{(Background-subtracted ncps)}}_{\mathrm{ss}}}{{\text{(Total ncps)}}_{\mathrm{ss}}},\end{array}\end{array}$

where the subscript ss implies the value at wall steady state. Lastly, it will be important to keep this relationship between background-subtracted and total calibration constants in mind when comparing experimentally derived sensitivities to theoretically calculated sensitivities (as in, e.g., Iyer et al., 2016; Lopez-Hilfiker et al., 2016; Sekimoto et al., 2017). The theoretical calculations will be estimating the total signal per amount of analyte, without regard to wall effects.

In summary, the accuracy of a calibration constant will depend on how the wall interactions for an analyte are quantified during calibration and ambient measurements. For sticky compounds with substantial wall interactions, systematic biases in instrument response, and thus reported concentrations, can easily approach a factor of 2 (or much more in signal tails) without a self-consistent accounting of wall-induced backgrounds during calibrations and measurements.

4 Quantifying IMR delay times

## 4.1 Chamber measurement methods

The wall interactions in the IMR designed in this work were characterized through a series of experiments, including extensive tests performed in the University of Colorado (CU) Environmental Chamber Facility in Boulder, CO. The chamber contained a 20 m3 FEP Teflon bag operated in batch mode. The experimental method used in this work has been described in more detail in similar experiments designed to characterize wall interactions in various types of tubing, Teflon bags, and other instrument inlets (Krechmer et al., 2017; Liu et al., 2019). Briefly, a series of 1-alkanol compounds (C6, C8, C9, C10, and C12) were injected into the dark chamber along with methyl nitrite and NO at room temperature. UV blacklights were turned on for 10 s to photolyze methyl nitrite, producing OH radicals through subsequent chemistry (Atkinson et al., 1981). Rapid oxidation of the 1-alkanol compounds until the OH radicals were depleted led to quasistable ppt-level concentrations of a range of oxidation products, including hydroxynitrates (HN), dihydroxynitrates (DHN), and dihydroxycarbonyls (DHC) as listed in Table S1 in the Supplement. The volatilities of these compounds were estimated using the SIMPOL method (Pankow and Asher, 2008) as in Liu et al. (2019). Chamber air was sampled into the IMR through a 0.75 in. OD, approximately 8 in. long PTFE tube. The sample flow through this inlet and into the IMR was 2 slpm, and the ion flow into the IMR was 3 slpm, for a total flow of 5 slpm at a constant ∼70 Torr in the IMR.

## 4.2 IMR delay times vs. previous designs

The main goal of updating the IMR design as described in Sect. 3.1 was to reduce the measurement artifacts due interactions between analytes and IMR wall surfaces. As described in detail in Sect. 3.2 above, a reduction in wall-induced artifacts leads to improved spatial/temporal accuracy of the measurements, reduced impacts of possible surface chemistry artifacts, and more easily interpretable data. In this section, we describe the measurements used to quantify the improvement achieved in the new design.

In past experiments, wall interactions occurring in lengths of tubing or in IMRs have been quantified using the amount of time required for a signal to decay to 10 % of the maximum total signal after wall steady state had been achieved and the signal source was removed (Neuman et al., 1999; Veres et al., 2008; Pagonis et al., 2017; Deming et al., 2019; Liu et al., 2019). When the ambient source of the compound is removed, the background-subtracted signal rapidly decays and all of the remaining signal is due to molecules evaporating or desorbing from the wall surfaces.

To systematically test delay times in the updated IMR design, we employed the recently developed method of sampling a range of HN, DHN, and DHC oxidation products spanning more than 5 orders of magnitude in volatility. Further details of the experimental setup can be found in related work (Krechmer et al., 2017; Liu et al., 2019). These compounds were allowed to equilibrate with the chamber walls, and sampling from the chamber then provided a constant source of these compounds. Chamber air was sampled through the coaxial IMR into the CIMS until IMR wall steady state was achieved for all compounds. At this point, UHP N2 was injected into the variable orifice upstream of the IMR, removing the source of analyte and starting the measurement of delay times. While the chamber air was dry for all experiments, measurements were performed with and without adding an estimated 1–2×1016 molec. cm−3 water vapor directly to the IMR. This way, the effects of water vapor on the IMR surfaces were probed.

Figure 3Delay time measurement of a DHN (C9H19NO5) in an I CIMS with the new IMR. Prior to the start of the delay measurement, wall steady state had been achieved. The total signal is equal to the background-subtracted signal plus the background signal. Regular background measurements were performed for 6 s of each 1 min, illustrating that approximately half of the C9H19NO5 that entered the IMR was interacting with the walls prior to desorbing and being sampled. The delay time for this DHN, defined as the time required for the signal to return to 10 % of the original value, was determined to be 356 s.

The delay time measurement for one compound, a C9H19NO5 DHN with an estimated C* of 14.6 µg m−3 (which would typically be categorized as a semivolatile organic compound or SVOC), is shown in Fig. 3. Fast-zero measurements (6 s every 1 min) of the background signal were taken prior to the start of the delay time measurement, illustrating that wall steady state was reached and that approximately 48 % of the total signal was due to the background in the IMR. In other words, half of those analyte molecules that entered the IMR had interactions with a wall surface prior to desorbing and being sampled at the detector. Once the delay time measurement started, the signal due to molecules that did not interact with walls rapidly decayed (within several seconds) followed by the slower decay of the background signal. The amount of time required for the total signal to drop to within 10 % of the persistent background level (which for this compound was essentially equal to the baseline noise) was measured to be 356 s, or 5.9 min. This DHN is an example of a compound that would require the fast-zero method of background determination in order to achieve temporal/spatial resolution when sampling variable concentrations such as plumes. Delay times were also determined for the range of other compounds present in the chamber for both a dry and humidified IMR.

Liu et al. (2019) compiled delay times for the IMRs of several instruments, including a quadrupole proton transfer reaction MS (q-PTRMS; Pagonis et al., 2017), a Vocus inlet coupled with a time-of-flight MS (Krechmer et al., 2018), an I CIMS using the commercially available IMR (Aerodyne, Inc.) operated at dry conditions by the Jimenez group, and a custom design similar to the commercially available IMR operated under humidified conditions by the Ziemann group. The I CIMS instruments were tested using the same method and analytes as in this work, while the delay times for the q-PTRMS and Vocus instruments were measured using a similar method involving a series of ketones at equilibrium with the walls in a chamber (Pagonis et al., 2017; Deming et al., 2019). Figure 4 illustrates the delay times measured here in context with the previous results.

Figure 4Delay times for a variety of organic molecules as a function of saturation vapor concentration (C*, µg m−3), compared with previous IMR designs including a q-PTRMS, Vocus PTR-ToF-MS, and several I CIMS instruments with different IMRs. The delay time in a nitrate (${\mathrm{NO}}_{\mathrm{3}}^{-}$) CIMS is also shown for comparison. The organic molecules are described in Table S1 in the Supplement.

In general, the delay times for the coaxial IMR described herein were approximately an order of magnitude shorter than for the stainless steel IMR under dry conditions and approximately 5 times shorter than the similar but humidified stainless steel IMR. The effects of humidity in an IMR appear to depend both on the material of the IMR and the type of analyte. In stainless steel IMRs, increased humidity led to uniformly shorter delay times for all analytes. However, in our new IMR, humidity led to slightly longer delay times for DHN and no change for HN. These results illustrate how the interaction between an analyte and a surface can be determined by a complex combination of factors, including the surface type, surface modifications, and functional groups and properties of the analyte.

For both the dry and humidified stainless steel IMRs, results indicated that delay times started trending back towards shorter values at the lowest measured C* values. This trend is in contrast to the results from the coaxial IMR. Liu et al. (2019) attributed this to irreversible loss of the analyte to the walls, which would decrease the background signal relative to the background-subtracted signal. It may be the case that this irreversible loss for species of ${C}^{*}<\mathrm{100}$µg m−3 is unique to those stainless steel IMR surfaces and does not occur on the PFA and FEP Teflon surfaces in the coaxial IMR. However, it may also be the case that those lowest volatility compounds had not yet achieved wall steady state with the inlet tubes and stainless steel IMR walls. This would have led to an artificially low amount of the background signal relative to the background-subtracted signal, causing underestimates of delay times. Successively lower C* compounds would be further away from steady state for the sampling time prior to the start of the delay measurement, leading to successively more underestimated delay times. If one assumes the linear relationship (in log–log space) observed in the coaxial IMR and for ${C}^{*}>\mathrm{100}$µg m−3 in the stainless steel IMRs would hold for the lower C* compounds, the delay times in the stainless steel IMRs would reach on the order of ∼1000 min at most, which would become an implausible amount of time to wait for wall steady state to be reached (and for all of the background to decay during the delay measurement) during a batch mode chamber experiment. Also, it would be extremely difficult to ascertain when wall steady state was achieved due to the slow rate of increase of the background signal.

At first glance, extrapolation of results would indicate that the Vocus and q-PTRMS instruments would have 1 or several orders of magnitude longer respective delay times for the same HN, DHN, and DHC compounds compared with our new IMR. The Vocus and q-PTRMS instruments are designed primarily for H3O+ ionization chemistry, typically to target a much more volatile set of analyte compounds compared with I ionization. They also typically operate with an IMR pressure in the range of 2 Torr, which will greatly enhance the rates of diffusion to the walls compared with the ∼70 Torr I CIMS IMRs. Both our new IMR and the Vocus have delay times spanning from a second to greater than several minutes over their respective volatility ranges of interest. However, these results indicate that a Vocus-type design would not perform as well for I ionization without modifications.

The IMR used in Lee et al. (2018), which employed the same variable orifice with an H2O vapor addition port but with turbulent mixing of ions and analyte, was not tested on the CU chamber. However, laboratory experiments indicate that the delay time for HNO3 under similar humidified conditions in the Lee et al. (2018) IMR was approximately a factor of 3 longer than in this new IMR (see Fig. S2), providing a measure of the improvements between that design and the one presented herein.

5 Conclusions

The effects of wall interactions in mass spectrometer inlets and IMRs have been a persistent but sometimes nebulous concern for as long as researchers have been sampling gases, particularly the lower-volatility and soluble ones often referred to as “sticky” gases. As the importance of such gases to atmospheric processes like new particle formation/growth and SOA formation continues to be discovered, so does the need for higher precision and accuracy of the measurements. Recent research has begun to focus on analyte–surface interactions, including absorption and adsorption processes and how they can affect measurements in IMRs and in sample tubing. In this work, we introduced a new IMR design with the goal of reducing IMR wall interactions. This design was informed by the concepts in this and prior research. It sought to minimize wall interactions by limiting both turbulent and diffusive mixing to the walls and by choosing wall surfaces that interact least with the analyte molecules. The new IMR was shown to have delay times that were 3–10 times shorter than previous IMR versions. This translates to higher signal to noise of the background-subtracted signal (i.e., the signal that did not interact with walls), less influence from possible surface reactions, and easier interpretation of measured time series.

Since there are a large number of factors affecting wall interactions, many of which are poorly understood, there has been little ability for researchers across different platforms to apply a uniform treatment to wall effects. Here, we aimed to provide a common framework of concepts with which the wall interactions in all instrumental systems could be described and treated. In this framework, the total signal measured at the detector for a given analyte can be described as originating from the sum of the following two pathways: (1) some fraction of the molecules do not interact with IMR wall surfaces and are sampled with a time response equal to the average residence time in the IMR, and (2) the remaining fraction of molecules interact with the IMR walls via adsorption/absorption and are sampled with a delayed time response longer than the average IMR residence time. We demonstrated a method of using fast zeroing to separate the signal into these parts, namely the background-subtracted signal and the dynamic plus persistent background signals. The background-subtracted signal is the only part that is a constant function of, and deterministic of, the concentration of analyte entering the IMR as a function of time, and it is thus an essential quantity for accurately capturing the time dependence of analyte concentrations. This framework could be adapted to other inlet and instrument configurations. A consistent manner of calibration was also presented.

This IMR design and the characterization of wall interactions represent an improvement over previous low-pressure CIMS techniques used in atmospheric chemistry. Future work could build upon this design, for instance by further decreasing wall interactions. One could also imagine a case where the walls are modified/treated with a method similar to that in Roscioli et al. (2016) but in such a way as to make the walls an irreversible sink for a particular analyte, thereby eliminating the background signal and making the total signal equal to the background-subtracted signal. However, finding a modification technique that would work for the entire range of diverse analyte molecules to which iodide-adduct ionization is sensitive could prove challenging.

To facilitate comparisons and merging of data sets from different instruments, we also encourage the users of all CIMS techniques to adopt the methods for calibration and background subtraction discussed herein when sampling analytes that suffer from wall interactions, and we encourage the reporting of all relevant sampling and calibration method details in the publication of such research.

Data availability
Data availability.

All data are available upon request to the authors.

Supplement
Supplement.

Author contributions
Author contributions.

BBP and JAT designed, assembled, and tested the IMR and determined the framework of wall interactions. BBP, XL, and JLJ conducted the characterization experiments at the CU Environmental Chamber facility and participated in the analysis of the data. BBP wrote the manuscript. All authors contributed to revisions of the manuscript.

Competing interests
Competing interests.

The authors declare that they have no conflict of interest.

Acknowledgements
Acknowledgements.

The authors sincerely thank machinist Dennis Canuelle from the University of Washington for his contributions to the design and manufacture of the IMR. We are grateful for many helpful discussions with Demetrios Pagonis, Jordan E. Krechmer, and other members of the Aerodyne ToF-CIMS user's group which helped to shape the material presented herein. We thank Douglas A. Day for experimental support during the chamber measurements.

Financial support
Financial support.

This research has been supported by the National Science Foundation, Division of Atmospheric and Geospace Sciences (grant no. AGS-1652688), and the National Oceanic and Atmospheric Administration (grant no. NA17OAR4310012). Xiaoxi Liu and Jose L. Jimenez were supported by the Alfred P. Sloan Foundation (grant no. 2016-7173) and the U.S. Department of Energy, Biological and Environmental Research (grant no. DE-SC0016559).

Review statement
Review statement.

This paper was edited by Hendrik Fuchs and reviewed by two anonymous referees.

References

Atkinson, R., Carter, W. P. L., Winer, A. M. and Pitts, J. N.: An Experimental Protocol For The Determination Of OH Radical Rate Constants With Organics Using Methyl Nitrite Photolysis As An OH Radical Source, J. Air Pollut. Control Assoc., 31, 1090–1092, https://doi.org/10.1080/00022470.1981.10465331, 1981.

Bertram, T. H., Kimmel, J. R., Crisp, T. A., Ryder, O. S., Yatavelli, R. L. N., Thornton, J. A., Cubison, M. J., Gonin, M., and Worsnop, D. R.: A field-deployable, chemical ionization time-of-flight mass spectrometer, Atmos. Meas. Tech., 4, 1471–1479, https://doi.org/10.5194/amt-4-1471-2011, 2011.

Çengel, Y. A. and Cimbala, J. M.: Fluid Mechanics?: Fundamentals And Applications, 3 edn., The McGraw-Hill Companies, Inc., New York, NY, 2014.

Crounse, J. D., McKinney, K. A., Kwan, A. J., and Wennberg, P. O.: Measurement Of Gas-Phase Hydroperoxides By Chemical Ionization Mass Spectrometry, Anal. Chem., 78, 6726–6732, https://doi.org/10.1021/ac0604235, 2006.

Crutzen, P. J.: The Role Of NO And NO2 In The Chemistry Of The Troposphere And Stratosphere, Annu. Rev. Earth Planet. Sci., 7, 443–472, https://doi.org/10.1146/annurev.ea.07.050179.002303, 1979.

Deming, B. L., Pagonis, D., Liu, X., Day, D. A., Talukdar, R., Krechmer, J. E., de Gouw, J. A., Jimenez, J. L., and Ziemann, P. J.: Measurements of delays of gas-phase compounds in a wide variety of tubing materials due to gas–wall interactions, Atmos. Meas. Tech., 12, 3453–3461, https://doi.org/10.5194/amt-12-3453-2019, 2019.

Di Carlo, P., Brune, W. H., Martinez, M., Harder, H., Lesher, R., Ren, X. R., Thornberry, T., Carroll, M. A., Young, V., Shepson, P. B., Riemer, D., Apel, E., and Campbell, C.: Missing OH Reactivity In A Forest: Evidence For Unknown Reactive Biogenic VOCs, Science, 304, 722–725, https://doi.org/10.1126/science.1094392, 2004.

Donahue, N. M., Kroll, J. H., Pandis, S. N., and Robinson, A. L.: A two-dimensional volatility basis set – Part 2: Diagnostics of organic-aerosol evolution, Atmos. Chem. Phys., 12, 615–634, https://doi.org/10.5194/acp-12-615-2012, 2012.

Ehn, M., Thornton, J. A., Kleist, E., Sipilä, M., Junninen, H., Pullinen, I., Springer, M., Rubach, F., Tillmann, R., Lee, B., Lopez-Hilfiker, F., Andres, S., Acir, I.-H., Rissanen, M., Jokinen, T., Schobesberger, S., Kangasluoma, J., Kontkanen, J., Nieminen, T., Kurtén, T., Nielsen, L. B., Jørgensen, S., Kjaergaard, H. G., Canagaratna, M., Maso, M. D., Berndt, T., Petäjä, T., Wahner, A., Kerminen, V.-M., Kulmala, M., Worsnop, D. R., Wildt, J., and Mentel, T. F.: A Large Source Of Low-Volatility Secondary Organic Aerosol, Nature, 506, 476–479, https://doi.org/10.1038/nature13032, 2014.

Eisele, F. L. and Tanner, D. J.: Measurement Of The Gas Phase Concentration Of H2SO4 And Methane Sulfonic Acid And Estimates Of H2SO4 Production And Loss In The Atmosphere, J. Geophys. Res.-Atmos., 98, 9001–9010, https://doi.org/10.1029/93JD00031, 1993.

Gaston, C. J., Lopez-Hilfiker, F. D., Whybrew, L. E., Hadley, O., McNair, F., Gao, H., Jaffe, D. A., and Thornton, J. A.: Online Molecular Characterization Of Fine Particulate Matter In Port Angeles, WA: Evidence For A Major Impact From Residential Wood Smoke, Atmos. Environ., 138, 99–107, https://doi.org/10.1016/j.atmosenv.2016.05.013, 2016.

Goldstein, A. H. and Galbally, I. E.: Known And Unexplored Organic Constituents In The Earth's Atmosphere, Environ. Sci. Technol., 41, 1514–1521, https://doi.org/10.1021/es072476p, 2007.

Huang, Y., Zhao, R., Charan, S. M., Kenseth, C. M., Zhang, X., and Seinfeld, J. H.: Unified Theory Of Vapor–Wall Mass Transport In Teflon-Walled Environmental Chambers, Environ. Sci. Technol., 52, 2134–2142, https://doi.org/10.1021/acs.est.7b05575, 2018.

Huey, L. G., Hanson, D. R., and Howard, C. J.: Reactions Of ${\mathrm{SF}}_{\mathrm{6}}^{-}$ And I With Atmospheric Trace Gases, J. Phys. Chem., 99, 5001–5008, https://doi.org/10.1021/j100014a021, 1995.

Hunter, J. F., Day, D. A., Palm, B. B., Yatavelli, R. L. N., Chan, A. W. H., Kaser, L., Cappellin, L., Hayes, P. L., Cross, E. S., Carrasquillo, A. J., Campuzano-Jost, P., Stark, H., Zhao, Y., Hohaus, T., Smith, J. N., Hansel, A., Karl, T., Goldstein, A. H., Guenther, A., Worsnop, D. R., Thornton, J. A., Heald, C. L., Jimenez, J. L., and Kroll, J. H.: Comprehensive Characterization Of Atmospheric Organic Carbon At A Forested Site, Nat. Geosci., 10, 748–753, https://doi.org/10.1038/ngeo3018, 2017.

Isaacman, G., Kreisberg, N. M., Yee, L. D., Worton, D. R., Chan, A. W. H., Moss, J. A., Hering, S. V., and Goldstein, A. H.: Online derivatization for hourly measurements of gas- and particle-phase semi-volatile oxygenated organic compounds by thermal desorption aerosol gas chromatography (SV-TAG), Atmos. Meas. Tech., 7, 4417–4429, https://doi.org/10.5194/amt-7-4417-2014, 2014.

Isaacman-Van Wertz, G., Massoli, P., O'Brien, R., Lim, C., Franklin, J. P., Moss, J. A., Hunter, J. F., Nowak, J. B., Canagaratna, M. R., Misztal, P. K., Arata, C., Roscioli, J. R., Herndon, S. T., Onasch, T. B., Lambe, A. T., Jayne, J. T., Su, L., Knopf, D. A., Goldstein, A. H., Worsnop, D. R., and Kroll, J. H.: Chemical Evolution Of Atmospheric Organic Carbon Over Multiple Generations Of Oxidation, Nat. Chem., 10, 462–468, https://doi.org/10.1038/s41557-018-0002-2, 2018.

Iyer, S., Lopez-Hilfiker, F., Lee, B. H., Thornton, J. A., and Kurtén, T.: Modeling The Detection Of Organic And Inorganic Compounds Using Iodide-Based Chemical Ionization, J. Phys. Chem. A, 120, 576–587, https://doi.org/10.1021/acs.jpca.5b09837, 2016.

Jokinen, T., Sipilä, M., Junninen, H., Ehn, M., Lönn, G., Hakala, J., Petäjä, T., Mauldin III, R. L., Kulmala, M., and Worsnop, D. R.: Atmospheric sulphuric acid and neutral cluster measurements using CI-APi-TOF, Atmos. Chem. Phys., 12, 4117–4125, https://doi.org/10.5194/acp-12-4117-2012, 2012.

Kercher, J. P., Riedel, T. P., and Thornton, J. A.: Chlorine activation by N2O5: simultaneous, in situ detection of ClNO2 and N2O5 by chemical ionization mass spectrometry, Atmos. Meas. Tech., 2, 193–204, https://doi.org/10.5194/amt-2-193-2009, 2009.

Krechmer, J. E., Coggon, M. M., Massoli, P., Nguyen, T. B., Crounse, J. D., Hu, W., Day, D. A., Tyndall, G. S., Henze, D. K., Rivera-Rios, J. C., Nowak, J. B., Kimmel, J. R., Mauldin, R. L., Stark, H., Jayne, J. T., Sipilä, M., Junninen, H., Clair, J. M. St., Zhang, X., Feiner, P. A., Zhang, L., Miller, D. O., Brune, W. H., Keutsch, F. N., Wennberg, P. O., Seinfeld, J. H., Worsnop, D. R., Jimenez, J. L., and Canagaratna, M. R.: Formation Of Low Volatility Organic Compounds And Secondary Organic Aerosol From Isoprene Hydroxyhydroperoxide Low-NO Oxidation, Environ. Sci. Technol., 49, 10330–10339, https://doi.org/10.1021/acs.est.5b02031, 2015.

Krechmer, J. E., Groessl, M., Zhang, X., Junninen, H., Massoli, P., Lambe, A. T., Kimmel, J. R., Cubison, M. J., Graf, S., Lin, Y.-H., Budisulistiorini, S. H., Zhang, H., Surratt, J. D., Knochenmuss, R., Jayne, J. T., Worsnop, D. R., Jimenez, J.-L., and Canagaratna, M. R.: Ion mobility spectrometry–mass spectrometry (IMS–MS) for on- and offline analysis of atmospheric gas and aerosol species, Atmos. Meas. Tech., 9, 3245–3262, https://doi.org/10.5194/amt-9-3245-2016, 2016a.

Krechmer, J. E., Pagonis, D., Ziemann, P. J., and Jimenez, J. L.: Quantification Of Gas-Wall Partitioning In Teflon Environmental Chambers Using Rapid Bursts Of Low-Volatility Oxidized Species Generated In Situ, Environ. Sci. Technol., 50, 5757–5765, https://doi.org/10.1021/acs.est.6b00606, 2016b.

Krechmer, J. E., Day, D. A., Ziemann, P. J., and Jimenez, J. L.: Direct Measurements Of Gas/Particle Partitioning And Mass Accommodation Coefficients In Environmental Chambers, Environ. Sci. Technol., 51, 11867–11875, https://doi.org/10.1021/acs.est.7b02144, 2017.

Krechmer, J. E., Lopez-Hilfiker, F., Koss, A., Hutterli, M., Stoermer, C., Deming, B., Kimmel, J., Warneke, C., Holzinger, R., Jayne, J., Worsnop, D., Fuhrer, K., Gonin, M., and de Gouw, J.: Evaluation Of A New Reagent-Ion Source And Focusing Ion–Molecule Reactor For Use In Proton-Transfer-Reaction Mass Spectrometry, Anal. Chem., 90, 12011–12018, https://doi.org/10.1021/acs.analchem.8b02641, 2018.

Le Breton, M., McGillen, M. R., Muller, J. B. A., Bacak, A., Shallcross, D. E., Xiao, P., Huey, L. G., Tanner, D., Coe, H., and Percival, C. J.: Airborne observations of formic acid using a chemical ionization mass spectrometer, Atmos. Meas. Tech., 5, 3029–3039, https://doi.org/10.5194/amt-5-3029-2012, 2012.

Lee, B. H., Lopez-Hilfiker, F. D., Mohr, C., Kurtén, T., Worsnop, D. R., and Thornton, J. A.: An Iodide-Adduct High-Resolution Time-Of-Flight Chemical-Ionization Mass Spectrometer: Application To Atmospheric Inorganic And Organic Compounds, Environ. Sci. Technol., 48, 6309–6317, https://doi.org/10.1021/es500362a, 2014.

Lee, B. H., Mohr, C., Lopez-Hilfiker, F. D., Lutz, A., Hallquist, M., Lee, L., Romer, P., Cohen, R. C., Iyer, S., Kurtén, T., Hu, W., Day, D. A., Campuzano-Jost, P., Jimenez, J. L., Xu, L., Ng, N. L., Guo, H., Weber, R. J., Wild, R. J., Brown, S. S., Koss, A., de Gouw, J., Olson, K., Goldstein, A. H., Seco, R., Kim, S., McAvey, K., Shepson, P. B., Starn, T., Baumann, K., Edgerton, E. S., Liu, J., Shilling, J. E., Miller, D. O., Brune, W., Schobesberger, S., D'Ambro, E. L., and Thornton, J. A.: Highly Functionalized Organic Nitrates In The Southeast United States: Contribution To Secondary Organic Aerosol And Reactive Nitrogen Budgets, P. Natl. Acad. Sci. USA, 113, 1516–1521, https://doi.org/10.1073/pnas.1508108113, 2016.

Lee, B. H., Lopez-Hilfiker, F. D., Veres, P. R., McDuffie, E. E., Fibiger, D. L., Sparks, T. L., Ebben, C. J., Green, J. R., Schroder, J. C., Campuzano-Jost, P., Iyer, S., D'Ambro, E. L., Schobesberger, S., Brown, S. S., Wooldridge, P. J., Cohen, R. C., Fiddler, M. N., Bililign, S., Jimenez, J. L., Kurtén, T., Weinheimer, A. J., Jaegle, L., and Thornton, J. A.: Flight Deployment Of A High-Resolution Time-Of-Flight Chemical Ionization Mass Spectrometer: Observations Of Reactive Halogen And Nitrogen Oxide Species, J. Geophys. Res.-Atmos., 123, 7670–7686, https://doi.org/10.1029/2017JD028082, 2018.

Liu, X., Deming, B., Pagonis, D., Day, D. A., Palm, B. B., Talukdar, R., Roberts, J. M., Veres, P. R., Krechmer, J. E., Thornton, J. A., de Gouw, J. A., Ziemann, P. J., and Jimenez, J. L.: Effects of gas–wall interactions on measurements of semivolatile compounds and small polar molecules, Atmos. Meas. Tech., 12, 3137–3149, https://doi.org/10.5194/amt-12-3137-2019, 2019.

Lopez-Hilfiker, F. D., Mohr, C., Ehn, M., Rubach, F., Kleist, E., Wildt, J., Mentel, Th. F., Lutz, A., Hallquist, M., Worsnop, D., and Thornton, J. A.: A novel method for online analysis of gas and particle composition: description and evaluation of a Filter Inlet for Gases and AEROsols (FIGAERO), Atmos. Meas. Tech., 7, 983–1001, https://doi.org/10.5194/amt-7-983-2014, 2014.

Lopez-Hilfiker, F. D., Iyer, S., Mohr, C., Lee, B. H., D'Ambro, E. L., Kurtén, T., and Thornton, J. A.: Constraining the sensitivity of iodide adduct chemical ionization mass spectrometry to multifunctional organic molecules using the collision limit and thermodynamic stability of iodide ion adducts, Atmos. Meas. Tech., 9, 1505–1512, https://doi.org/10.5194/amt-9-1505-2016, 2016.

Massoli, P., Stark, H., Canagaratna, M. R., Krechmer, J. E., Xu, L., Ng, N. L., Mauldin, R. L., Yan, C., Kimmel, J., Misztal, P. K., Jimenez, J. L., Jayne, J. T., and Worsnop, D. R.: Ambient Measurements Of Highly Oxidized Gas-Phase Molecules During The Southern Oxidant And Aerosol Study (SOAS) 2013, ACS Earth Sp. Chem., 2, 653–672, https://doi.org/10.1021/acsearthspacechem.8b00028, 2018.

Matsunaga, A. and Ziemann, P. J.: Gas-Wall Partitioning Of Organic Compounds In A Teflon Film Chamber And Potential Effects On Reaction Product And Aerosol Yield Measurements, Aerosol Sci. Technol., 44, 881–892, https://doi.org/10.1080/02786826.2010.501044, 2010.

Mohr, C., Lopez-Hilfiker, F. D., Zotter, P., Prévôt, A. S. H., Xu, L., Ng, N. L., Herndon, S. C., Williams, L. R., Franklin, J. P., Zahniser, M. S., Worsnop, D. R., Knighton, W. B., Aiken, A. C., Gorkowski, K. J., Dubey, M. K., Allan, J. D., and Thornton, J. A.: Contribution Of Nitrated Phenols To Wood Burning Brown Carbon Light Absorption In Detling, United Kingdom During Winter Time, Environ. Sci. Technol., 47, 6316–6324, https://doi.org/10.1021/es400683v, 2013.

Neuman, J. A., Huey, L. G., Ryerson, T. B., and Fahey, D. W.: Study Of Inlet Materials For Sampling Atmospheric Nitric Acid, Environ. Sci. Technol., 33, 1133–1136, https://doi.org/10.1021/es980767f, 1999.

Neuman, J. A., Huey, L. G., Dissly, R. W., Fehsenfeld, F. C., Flocke, F., Holecek, J. C., Holloway, J. S., Hübler, G., Jakoubek, R., Nicks, D. K., Parrish, D. D., Ryerson, T. B., Sueper, D. T., and Weinheimer, A. J.: Fast-Response Airborne In Situ Measurements Of HNO3 During The Texas 2000 Air Quality Study, J. Geophys. Res., 107, 4436, https://doi.org/10.1029/2001JD001437, 2002.

Pagonis, D., Krechmer, J. E., de Gouw, J., Jimenez, J. L., and Ziemann, P. J.: Effects of gas–wall partitioning in Teflon tubing and instrumentation on time-resolved measurements of gas-phase organic compounds, Atmos. Meas. Tech., 10, 4687–4696, https://doi.org/10.5194/amt-10-4687-2017, 2017.

Pankow, J. F. and Asher, W. E.: SIMPOL.1: a simple group contribution method for predicting vapor pressures and enthalpies of vaporization of multifunctional organic compounds, Atmos. Chem. Phys., 8, 2773–2796, https://doi.org/10.5194/acp-8-2773-2008, 2008.

Peng, J., Hu, M., Guo, S., Du, Z., Zheng, J., Shang, D., Levy Zamora, M., Zeng, L., Shao, M., Wu, Y.-S., Zheng, J., Wang, Y., Glen, C. R., Collins, D. R., Molina, M. J., and Zhang, R.: Markedly Enhanced Absorption And Direct Radiative Forcing Of Black Carbon Under Polluted Urban Environments, P. Natl. Acad. Sci. USA, 113, 4266–4271, https://doi.org/10.1073/pnas.1602310113, 2016.

Roscioli, J. R., Zahniser, M. S., Nelson, D. D., Herndon, S. C., and Kolb, C. E.: New Approaches To Measuring Sticky Molecules: Improvement Of Instrumental Response Times Using Active Passivation, J. Phys. Chem. A, 120, 1347–1357, https://doi.org/10.1021/acs.jpca.5b04395, 2016.

Seinfeld, J. H. and Pandis, S. N.: Atmospheric Chemistry And Physics: From Air Pollution To Climate Change, 2nd edn., John Wiley & Sons Inc., Hoboken, New Jersey, USA, 2006.

Sekimoto, K., Li, S.-M., Yuan, B., Koss, A., Coggon, M., Warneke, C., and de Gouw, J.: Calculation Of The Sensitivity Of Proton-Transfer-Reaction Mass Spectrometry (PTR-MS) For Organic Trace Gases Using Molecular Properties, Int. J. Mass Spectrom., 421, 71–94, https://doi.org/10.1016/j.ijms.2017.04.006, 2017.

Shrivastava, M., Cappa, C. D., Fan, J., Goldstein, A. H., Guenther, A. B., Jimenez, J. L., Kuang, C., Laskin, A., Martin, S. T., Ng, N. L., Petaja, T., Pierce, J. R., Rasch, P. J., Roldin, P., Seinfeld, J. H., Shilling, J., Smith, J. N., Thornton, J. A., Volkamer, R., Wang, J., Worsnop, D. R., Zaveri, R. A., Zelenyuk, A., and Zhang, Q.: Recent Advances In Understanding Secondary Organic Aerosol: Implications For Global Climate Forcing, Rev. Geophys., 55, 509–559, https://doi.org/10.1002/2016RG000540, 2017.

Sparrow, E. M., Abraham, J. P., and Minkowycz, W. J.: Flow Separation In A Diverging Conical Duct: Effect Of Reynolds Number And Divergence Angle, Int. J. Heat Mass Transf., 52, 3079–3083, https://doi.org/10.1016/j.ijheatmasstransfer.2009.02.010, 2009.

Veres, P., Roberts, J. M., Warneke, C., Welsh-Bon, D., Zahniser, M., Herndon, S., Fall, R., and de Gouw, J.: Development Of Negative-Ion Proton-Transfer Chemical-Ionization Mass Spectrometry (NI-PT-CIMS) For The Measurement Of Gas-Phase Organic Acids In The Atmosphere, Int. J. Mass Spectrom., 274, 48–55, https://doi.org/10.1016/j.ijms.2008.04.032, 2008.

Veres, P. R., Roberts, J. M., Wild, R. J., Edwards, P. M., Brown, S. S., Bates, T. S., Quinn, P. K., Johnson, J. E., Zamora, R. J., and de Gouw, J.: Peroxynitric acid (HO2NO2) measurements during the UBWOS 2013 and 2014 studies using iodide ion chemical ionization mass spectrometry, Atmos. Chem. Phys., 15, 8101–8114, https://doi.org/10.5194/acp-15-8101-2015, 2015.

Yatavelli, R. L. N., Stark, H., Thompson, S. L., Kimmel, J. R., Cubison, M. J., Day, D. A., Campuzano-Jost, P., Palm, B. B., Hodzic, A., Thornton, J. A., Jayne, J. T., Worsnop, D. R., and Jimenez, J. L.: Semicontinuous measurements of gas–particle partitioning of organic acids in a ponderosa pine forest using a MOVI-HRToF-CIMS, Atmos. Chem. Phys., 14, 1527–1546, https://doi.org/10.5194/acp-14-1527-2014, 2014.

Yuan, B., Koss, A. R., Warneke, C., Coggon, M., Sekimoto, K., and de Gouw, J. A.: Proton-Transfer-Reaction Mass Spectrometry: Applications In Atmospheric Sciences, Chem. Rev., 117, 13187–13229, https://doi.org/10.1021/acs.chemrev.7b00325, 2017.

Zaytsev, A., Breitenlechner, M., Koss, A. R., Lim, C. Y., Rowe, J. C., Kroll, J. H., and Keutsch, F. N.: Using collision-induced dissociation to constrain sensitivity of ammonia chemical ionization mass spectrometry (${\mathrm{NH}}_{\mathrm{4}}^{+}$ CIMS) to oxygenated volatile organic compounds, Atmos. Meas. Tech., 12, 1861–1870, https://doi.org/10.5194/amt-12-1861-2019, 2019.

Zhao, J., Eisele, F. L., Titcombe, M., Kuang, C., and McMurry, P. H.: Chemical Ionization Mass Spectrometric Measurements Of Atmospheric Neutral Clusters Using The Cluster-CIMS, J. Geophys. Res., 115, D08205, https://doi.org/10.1029/2009JD012606, 2010.

Zhao, Y., Chan, J. K., Lopez-Hilfiker, F. D., McKeown, M. A., D'Ambro, E. L., Slowik, J. G., Riffell, J. A., and Thornton, J. A.: An electrospray chemical ionization source for real-time measurement of atmospheric organic and inorganic vapors, Atmos. Meas. Tech., 10, 3609–3625, https://doi.org/10.5194/amt-10-3609-2017, 2017.


text:
Imagine that you’re looking to buy a home. If you have an analytical mind then you might want to tackle this with a quantitative. Let’s suppose that you have a list of potential homes, and each home has some attributes that can help you compare them. As an example, we’ll consider three attributes:

• The price of the house, which you want to minimize
• The size of the house, which you want to maximize
• The city where the house if located, which you don’t really care about

Some houses will be objectively better than others because they will be cheaper and bigger. However, for some pairs of houses the comparison will not be as clear. It might be that house A is more expensive than house B but is also larger. In data analysis this set of best houses which are incomparable with each other is called a skyline. As they say, a picture is worth a thousand words, so let’s draw one.

We’ll simulate some houses using a very simple random process. Each house will be located in a random city. Then, the size of the house in square meters will be sampled from a normal distribution with mean 200 and standard deviation 50. Finally, the price of the house will be obtained by multiplying the size of the house by a price per square meter sampled from a given uniform distribution. I chose as cities Bordeaux, Lyon, and Toulouse. I got the prices per square meter from meilleursagents.com. In any case, none of the details really matter. The following piece of code will generate n_houses houses using the process I just described.

import random
import pandas as pd

city_prices = {
'Bordeaux': 4045,
'Lyon': 4547,
'Toulouse': 3278
}

def make_houses(n_houses, city_prices):

cities = [city for city in city_prices for _ in range(n_houses)]

sizes = [round(random.gauss(200, 50)) for _ in range(len(cities))]

prices = [
round(random.uniform(0.8, 1.2) * city_prices[city] * size)
for city, size in zip(cities, sizes)
]

return pd.DataFrame({
'city': cities,
'size': sizes,
'price': prices
})

To start let’s generate 100 houses and display the first 5.

houses = make_houses(100, city_prices)
houses.sample(5)

city size price
Lyon 170 733290
Lyon 127 557921
Bordeaux 227 857932
Lyon 168 621432
Toulouse 170 519786

Now let’s display all of the houses using a simple scatter plot.

ax = houses.plot.scatter(x='size', y='price')
ax.set_title('100 simulated houses')

The points that are to the bottom right are part of the skyline. Indeed they are either better or not comparable to the rest of the points. In other words, for any point in the skyline, it is impossible to find a point which is at least as good in every regard. In optimisation this is called the Pareto frontier (the link has some nice visuals).

I was surprised to find that there isn’t any canonical way to do this in pandas, and that not many people at all discuss how to find a skyline using Python. On the other hand skylines are really useful for specific tasks, such as ranking items online. For example if you’re looking for a hotel you might to find one that is cheap, big, and close to the beach. Instead of looking at each hotel you could first compute the skyline and check those instead. Of course there will be always some attributes that are impossible to rank because they depend on a person’s taste, but you get the idea. Some things are just objectively better.

I decided to first code a very naive implementation so that I could use it as a baseline. The idea is simply to search for the skyline using brute force. Each row is compared with the rest of the rows and discarded if it is dominated by at least one of them. To make things as clear as possible I first wrote a a_dominated_b function to check if a row called a dominates another row called b.

def a_dominates_b(a, b, to_min, to_max):

n_better = 0

for f in to_min:
if a[f] > b[f]:
return False
n_better += a[f] < b[f]

for f in to_max:
if a[f] < b[f]:
return False
n_better += a[f] > b[f]

if n_better > 0:
return True
return False

The implementation is quite simple. The to_min parameter lists the attributes that have to be minimized while to_max lists those that have to be, you guessed it, maximized. The only quirk happens when a and b are equal. In this case the expected – and intended – behavior is that a_dominates_b returns False.

For the sake of the example here’s a sample usage where a dominates b because it is cheaper.

>>> a = {'price': 100_000, 'size': 230}
>>> b = {'price': 120_000, 'size': 200}
>>> a_dominates_b(a, b, to_min=['price'], b=['size'])
True

Now we simply have to implement the nested for loops that searches for the skyline.

def find_skyline_brute_force(df, to_min, to_max):

rows = df.to_dict(orient='index')

skyline = set()

for i in rows:

dominated = False

for j in rows:

if i == j:
continue

if a_dominates_b(rows[j], rows[i], to_min, to_max):
dominated = True
break

if not dominated:

return pd.Series(df.index.isin(skyline), index=df.index)

In my implementation I return a pandas.Series which contains bools that indicate whether or not a row is part of the skyline. Let’s use this function to search for the skyline of the houses we generated earlier on, and then display them.

skyline = find_skyline_brute_force(houses, to_min=['price'], to_max=['size'])

colors = skyline.map({True: 'C1', False: 'C0'})
ax = houses.plot.scatter(x='size', y='price', c=colors, alpha=0.8)
ax.set_title('Houses skyline')

I’m too lazy to write unit tests, but this seems correct, right? As expected, the running time of this algorithm grows quadratically with the size of the dataset, and basically isn’t viable above 10,000 rows. It turns out there are many other algorithms which are much more efficient. I picked a simple one which uses a block nested loop (BNL). It seems to perform well for common cases, at least according to the few papers I skimmed through. The idea is to maintain a skyline and compare each incoming row with each element of the skyline. One of three cases can occur:

1. The point is dominated by one of the elements in the skyline.
2. The point dominates one or more points in the skyline.
3. The point is neither better nor worse than all of the points in the skyline.

In case 1 the point is simply ignored. In cases 2 and 3 the point will be inserted in the skyline. In case 2 the points in the skyline that are dominated are also deleted from the skyline. All in all the algorithm is quite simple but it took me some time to convince myself. I scratched my head a bit to get this to keep rows that are equal in all regards. Anyway, here is the code.

def count_diffs(a, b, to_min, to_max):
n_better = 0
n_worse = 0

for f in to_min:
n_better += a[f] < b[f]
n_worse += a[f] > b[f]

for f in to_max:
n_better += a[f] > b[f]
n_worse += a[f] < b[f]

return n_better, n_worse

def find_skyline_bnl(df, to_min, to_max):
"""Finds the skyline using a block-nested loop."""

rows = df.to_dict(orient='index')

# Use the first row to initialize the skyline
skyline = {df.index[0]}

# Loop through the rest of the rows
for i in df.index[1:]:

to_drop = set()
is_dominated = False

for j in skyline:

n_better, n_worse = count_diffs(rows[i], rows[j], to_min, to_max)

# Case 1
if n_worse > 0 and n_better == 0:
is_dominated = True
break

# Case 3
if n_better > 0 and n_worse == 0:

if is_dominated:
continue

skyline = skyline.difference(to_drop)

return pd.Series(df.index.isin(skyline), index=df.index)

The count_diffs method returns two counters which indicated one many attributes are better and how many are worse given two rows. The counters can then be used to map to one of the three cases listed above. Case 1 corresponds to n_worse > 0 and n_better == 0 while n_better > 0 and n_worse == 0 refers to case 2. Note that the case where n_worse and n_better are both equal to 0 means that a and b are identical. I have to say I am not 100% happy with the implementation, indeed my gut tells me there is a simpler way. But at least it does the trick.

A nice thing we can now do is compare find_skyline_bnl with find_skyline_brute_force to check that they output the same results. We can do so using the assert_series_equal function from pandas.

for _ in range(30):
houses = make_houses(n_houses=random.randint(120, 140), city_prices=city_prices)

pd.testing.assert_series_equal(
find_skyline_brute_force(df=houses, to_min=['price'], to_max=['size']),
find_skyline_bnl(df=houses, to_min=['price'], to_max=['size'])
)

Next we can compare the running time of both algorithms on a dataset of, say, 5000 houses.

import time

houses = make_houses(n_houses=5_000, city_prices=city_prices)

tic = time.time()
skyline = find_skyline_brute_force(df=houses, to_min=['price'], to_max=['size'])
print(f'Brute-force took {time.time() - tic:.3f} seconds')

tic = time.time()
skyline = find_skyline_bnl(df=houses, to_min=['price'], to_max=['size'])
print(f'Block nested loop took {time.time() - tic:.3f} seconds')

This outputs the following:

Brute-force took 10.658 seconds
Block nested loop took 0.320 seconds

In this case the block nested loop is over 30 times faster than the brute-force approach, which is great. Finally let’s look at how the execution time of the block nested loop method evolves with the number of rows. I simply recorded the execution time for sizes between 10,000 and 100,000 with a step of 10,000. I repeated the results 10 times in order to compute an average and a standard deviation which can be displayed using seaborn.

import seaborn as sns

def measure_time(n):
houses = make_houses(n_houses=n, city_prices=city_prices)
tic = time.time()
skyline = find_skyline_bnl(df=houses, to_min=['price'], to_max=['size'])
return time.time() - tic

durations = pd.DataFrame([
{'size': n, 'duration': measure_time(n)}
for n in np.arange(10000, 110_000, 10000) for i in range(10)
])

ax = sns.lineplot(x='size', y='duration', data=durations)
ax.grid()
ax.set_title('Running time in seconds of the BNL algorithm')

I didn’t take the time to code any other algorithm but I’m rather satisfied with this for the moment. I’m going to open an issue on pandas and see if there is any interest to pursue this further. One property of the block nested loop algorithm that might have gone unnoticed is that it works for streaming scenarios, and I will thus be adding an implementation to creme in the upcoming days.

I hope you enjoyed the read. Feel free to get in touch if anything bugs you or if you know any better algorithm.

format: plain


text:
# How to get rid of deformations of poles caused by sub division?

How can I get rid of the weird poles artifacts seen at the nose?


text:
## Precalculus (6th Edition) Blitzer

Published by Pearson

# Chapter 10 - Review Exercises - Page 1126: 88

#### Answer

The probability that a randomly selected student attends a private college among people from a middle-income family is $\frac{5}{16}$.

#### Work Step by Step

The probability that a student attends private college from a middle income family is: \begin{align} & \text{P}\left( \text{private college, middle income family} \right)\text{ = }\frac{\text{students attend priavate college}}{\text{students from middle-income family}} \\ & =\frac{50}{160} \\ & =\frac{5}{16} \end{align}

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.


text:
# Proving a well-known formula regarding adj(A)

The adjugate of a matrix $A$ is defined as $$(\mathrm{adj}(A))_{ij} = (-1)^{i+j}M_{ji}(A)$$ where $M_{ji}(A)$ is the determinant of the matrix $A$ after row $j$ and column $i$ have been removed. It is well-known that $$A\,\mathrm{adj}(A) = \mathrm{adj}(A)A = \det(A) I$$ Therefore, if $A$ is invertible, we get the famous formula $A^{-1} = \det(A)^{-1}\mathrm{adj}(A)$. There is also a well-known expansion of $A$ using the Cayley-Hamilton theorem, that looks like this: $$p_0 I + p_1 A + p_2 A^2 + \dots + p_n A^n = 0$$ where the $p_i$ are the coefficients of the characteristic polynomial of $A$. I have seen it written in many places (wikipedia, planetmath, textbooks) that the following also holds: $$\mathrm{adj}(A) = -(p_1 I + p_2 A + \dots + p_n A^{n-1})$$ where the $p_i$ are the same as in the previous equation. It is easy to prove this formula in the case where $A$ is invertible by applying the identities given above together with the fact that $p_0 = \det(A)$. However, I think the adjugate expansion still holds when $A$ is not invertible... how do I prove it for such a case?

• The function $A \mapsto \mathrm{adj}(A)$ is continuous, and the functions $A \mapsto p_k(A)$ (the coefficients of the characteristic polynomial) are continuous. The set of invertible matrices is dense, hence a continuity argument shows that the formula must hold for singular matrices. – copper.hat Aug 28 '13 at 22:38
• I think the fastest way to prove this is by noting that $p_k$ is the sum of all $(n-k)$-minors of $A$. – walcher Aug 28 '13 at 22:48
• See this excellent expository paper from Keith Conrad, where it is shown how to prove general identities by specializing to real or complex numbers. – Matemáticos Chibchas Aug 28 '13 at 23:11
• You can find an elementary proof here. – Pedro Tamaroff Aug 28 '13 at 23:23
• Answered in MO: Expressing adj(A) as a polynomial in A? – user1551 Aug 28 '13 at 23:25


text:
### Is there a C2 continuous element in 2D available?

158
views
1
6 months ago by
Is there a C2 continuous element implemented in 2D in 2017.2?

Thanks
Community: FEniCS Project

If you are asking about finite element of class $C^2$, i.e. having global(over the whole mesh) $C^2$ continuity, the answer is no.
Do import ffc; ffc.supported_elements to see the list of supported finite elements.


text:
# Is the Goldbach Conjecture part of a larger pattern?

1. Jul 21, 2010

### raycb

I wonder if the Goldbach Conjecture could be extended, so that the even number halfway between two primes that differ by 4n + 2 can be written as the sum of two primes from pairs that differ by 4n + 2? This conjecture often fails for the first few numbers, but then seems to begin working.

For example, the midpoint of 3 and 13 is 8, which cannot be written as the sum of two primes from pairs that differ by 10, but the midpoint of 103 and 113 is 108, which can be written as the sum of 29 and 89, which come from the pairs 19 and 29, and 79 and 89.

2. Jul 21, 2010


text:
Complex variables, integral

1. Mar 18, 2008

babyrudin

2. Relevant equations

Using complex analysis, compute
$$\int_{-\infty}^{\infty} \frac{e^{itx}}{1+x^2}dx$$
where t is real.

3. The attempt at a solution

I'm not good at complex analysis at all and am totally lost. I do know some Fourier analysis though and using it I got
$$\pi e^{-|t|}$$.
How should I solve it using complex analysis?

Last edited: Mar 18, 2008
2. Mar 19, 2008

Tom Mattson

Staff Emeritus
Try using the Residue Theorem.

3. Mar 19, 2008

babyrudin

Great, I think I know how to do it now. I was trying the Cauchy integral formula too much. Thanks!