Peak-fitting and integration imprecision in the Aerodyne aerosol mass spectrometer : effects of mass accuracy on location-constrained fits

The errors inherent in the fitting and integration of the pseudo-Gaussian ion peaks in Aerodyne high-resolution aerosol mass spectrometers (HR-AMSs) have not been previously addressed as a source of imprecision for these or similar instruments. This manuscript evaluates the significance of this imprecision and proposes a method for their estimation in routine data analysis. In the first part of this work, it is shown that peakintegration errors are expected to scale linearly with peak height for the constrained-peak-shape fits performed in the HR-AMS. An empirical analysis is undertaken to investigate the most complex source of peak-integration imprecision: the imprecision in fitted peak height, σh. It is shown that the major contributors to σh are the imprecision and bias inherent in them/z calibration, both of which may arise due to statistical and physical non-idealities of the instrument. A quantitative estimation of these m/z-calibration imprecisions and biases show that they may vary from ion to ion, even for ions of similar m/z. In the second part of this work, the empirical analysis is used to constrain a Monte Carlo approach for the estimation of σh and thus the peak-integration imprecision. The estimated σh for selected well-separated peaks (for which m/z-calibration imprecision and bias could be quantitatively estimated) scaled linearly with peak height as expected (i.e. as n). In combination with the imprecision in peak-width quantification (which may be easily and directly estimated during quantification), peak-fitting imprecisions therefore dominate counting imprecisions (which scale as n) at high signals. The previous HR-AMS uncertainty model therefore underestimates the overall fitting imprecision even for wellresolved peaks. We illustrate the importance of this conclusion by performing positive matrix factorization on a synthetic HR-AMS data set both with and without its inclusion. In the third part of this work, the Monte Carlo approach is extended to the case of an arbitrary number of overlapping peaks. Here, a modification to the empirically constrained approach was needed, because the ion-specific m/z-calibration bias and imprecision can generally only be estimated for well-resolved peaks. The modification is to simply overestimate the m/z-calibration imprecision in all cases. This overestimation results in only a slight overestimate of σh, while significantly reducing the sensitivity of σh to the unknown, ion-specificm/z-calibration biases. Thus, with only the meaPublished by Copernicus Publications on behalf of the European Geosciences Union. 4616 J. C. Corbin et al.: AMS peak-integration errors sured data and an approximate estimate of the order of magnitude of m/z-calibration biases as input, conservative and unbiased estimates of peak-integration imprecisions may be obtained for each peak in any ensemble of overlapping peaks.

estimated σ h for selected well-separated peaks (for which m/z-calibration imprecision and bias could be quantitatively estimated) scaled linearly with peak height as expected (i.e. as n 1 ).In combination with the imprecision in peak-width quantification (which may be easily and directly estimated during quantification), peak-fitting imprecisions therefore dominate counting imprecisions (which scale as n 0.5 ) at high signals.The previous HR-AMS uncertainty model therefore underestimates the overall fitting imprecision even for wellresolved peaks.We illustrate the importance of this conclusion by performing positive matrix factorization on a synthetic HR-AMS data set both with and without its inclusion.
In the third part of this work, the Monte Carlo approach is extended to the case of an arbitrary number of overlapping peaks.Here, a modification to the empirically constrained approach was needed, because the ion-specific m/z-calibration bias and imprecision can generally only be estimated for well-resolved peaks.The modification is to simply overestimate the m/z-calibration imprecision in all cases.This overestimation results in only a slight overestimate of σ h , while significantly reducing the sensitivity of σ h to the unknown, ion-specific m/z-calibration biases.Thus, with only the mea-sured data and an approximate estimate of the order of magnitude of m/z-calibration biases as input, conservative and unbiased estimates of peak-integration imprecisions may be obtained for each peak in any ensemble of overlapping peaks.
HR-AMS signals are routinely quantified with the free, open-source "PIKA" software (Sueper et al., 2011), written in Igor Pro (WaveMetrics, OR, USA).PIKA allows the user to perform both basic data processing and complex analyses, including high-resolution peak analysis (DeCarlo et al., 2006), mass quantification (Allan et al., 2004), and elemental analysis (Aiken et al., 2007).
PIKA is widely used to prepare HR-AMS data for leastsquares statistical models such as positive matrix factorization (PMF) (Paatero and Tapper, 1994;Ulbrich et al., 2009;Zhang et al., 2011) or simple linear regression (e.g. Lee et al., 2010).These statistical models are solved by minimizing the residuals between uncertainty-weighted data and the model, so both the data and their uncertainties must be quantified in order to obtain meaningful results.In the previous sentence, "uncertainty" refers only to the internal imprecision of the HR-AMS data set (discussed further below) and not to the overall accuracy of HR-AMS-based mass concentrations, elemental ratios, or other data products.These higher-order data products require additional calibration factors which dominate their overall inaccuracy of roughly ±25 % (Canagaratna et al., 2007;Bahreini et al., 2009;Aiken et al., 2008;Canagaratna et al., 2015).Such inaccuracies are not normally relevant for the statistical modelling of HR-AMS measurements and do not influence the peak-integration imprecisions discussed below.
The current version of PIKA (1.10C) estimates HR-AMS uncertainties from the square root of the number of estimated ion counts (DeCarlo et al., 2006), following techniques developed for unit-mass-resolution (UMR) versions of the AMS (Allan et al., 2003).These UMR AMSs estimate the signals at a given integer m/z by summing all ion counts near that signal.In contrast, PIKA estimates the signals of a given ion by fitting a Gaussian-like (pseudo-Gaussian) function to background-subtracted data and integrating the fitted peak.This additional complexity introduces additional uncertainties but is necessary and useful because HR-AMS mass spectra are frequently comprised of incompletely resolved (overlapping) isobaric peaks, each represented by relatively few data points.
The significance and magnitude of peak-integration uncertainties in PIKA-analysed HR-AMS data have not been previously addressed.Müller et al. (2011) discussed peak fitting for the lower-resolution compact time-of-flight AMS (C-ToF-AMS), using a different algorithm than that used by PIKA (the PIKA algorithm is detailed in Sect.2).Cubison and Jimenez (2015) used a PIKA-like approach to perform an extensive study of a two-peak system while assuming an ideal mass spectrometer.They provided a parameterization for imprecision estimation in such a system while considering the lowest-achievable m/z-calibration uncertainty and, relative to this study, a large number of data points per peak.The present manuscript approaches the problem from the opposite direction to Cubison and Jimenez (2015), beginning from an empirical analysis and ending with a method for estimation which is not limited to just two peaks.The two approaches are compared in further detail in Sect.6.
This manuscript addresses peak-integration uncertainties in PIKA by using a test data set to explore and understand the origins of peak-integration uncertainties in PIKA, using methods that are intended to be applicable to any HR-AMS or other mass spectrometer.The results of this empirical analysis are then used to construct a Monte Carlo model of the PIKA peak-fitting procedure, which allows the magnitude of peak-integration uncertainties for well-resolved (isolated) peaks and for overlapping peaks to be estimated.This empirically based approach allowed several assumptions behind uncertainty estimation to be directly evaluated and may be applied to any new data set.
The manuscript is structured as follows.First, Sect. 2 outlines the sources of uncertainty in HR-AMS analysis and describes the details of a PIKA analysis.Then, Sect. 3 presents a theoretical discussion and empirical analysis of peakintegration errors, which arise from peak-width and peakheight uncertainties.The focus is on the simpler case of wellresolved peaks.Peak-width uncertainties may be directly estimated, but peak-height uncertainties are much more complex and thus are the focus of the remainder of this section.It is shown that peak-height uncertainties are mostly due to biases and imprecisions in the m/z calibration; these calibration errors are then quantitatively estimated for well-resolved peaks.
Based on the constraints established in the previous section, Sect. 4 applies a Monte Carlo approach to evaluate the imprecision in fitted peak heights due to m/zcalibration errors for well-resolved peaks.Even for these well-resolved peaks, it is shown that these imprecisions are significant, scale linearly with peak height, and are significantly influenced by m/z-calibration biases.The overall the ith m/z bin of a mass spectrum µ the mode of a peak σ X imprecision in X (for X = h, w, . ..) peak-integration imprecision is discussed, with an illustrative example for a specific peak.The impacts of this peakintegration imprecision on PMF are then demonstrated on a synthetic HR-AMS data set.Section 5 then extends the Monte Carlo approach to the case of overlapping peaks.Finally, Sect.6 places our results in the context of previous work, discusses limitations, and addresses its practical application.
A number of mathematical symbols and abbreviations are used throughout; a list is provided in Table 1.Note that because of the details of the PIKA analysis (Sect.2), m/zcalibration errors manifest as peak-location-prediction errors (µ-prediction errors); we therefore use the latter expression below.
Throughout this manuscript, the terms "imprecision" and "bias" are used when referring respectively to random and independent errors (averaging to 0) and to errors of constant value.The distinction between these two concepts varies naturally at different stages of the analysis: if peak fitting is biased by an effect that varies from peak to peak, then an imprecision in the overall set of fitted peaks will result.As we discuss below, this is the case when peak positions are constrained by an m/z calibration during fitting.

Conceptual basis
Four conceptual categories contributing to HR-AMS uncertainties can be defined: interpretation, counting, instrumental, and analysis uncertainties.These uncertainties may be defined and addressed as follows.
1. Interpretation uncertainties arise when a given signal may arise from sources other than the analyte.For example, in the AMS, H 2 O + ions may form when either gas-phase water, particle-bound water, or the thermal decomposition of oxygenated functional groups in organic PM (OM) (Aiken et al., 2008), inorganic PM (Chen et al., 2011), or BC (Corbin et al., 2014).The interpretation of an H 2 O + ion as originating from any one of these sources therefore requires additional information or assumptions to be made.In the AMS, a fraction of the overall H 2 O + signal is typically attributed to OM according to laboratory-measured fragmentation patterns (Allan et al., 2004) as detailed by Chen et al. (2011).This so-called fragmentation-table approach may introduce biases but not imprecision to the data set.The biases would be constant only for a constant aerosol composition.
Interpretation uncertainties may also occur if an ion is misidentified or omitted in the PIKA software.Such errors are not considered in this work.
2. Counting uncertainties estimate the degree to which a count of n ions would vary if that count were repeated for the same system and the same time period (Taylor, 1997).They are therefore a measure of imprecision.Poisson uncertainties are included in the standard UMR-AMS and HR-AMS error models and are determined by translating mass-spectral peak areas to ion signal rates and applying the Poisson distribution to determine σ n as √ n for a count of n ions over a specific time period (Allan et al., 2003;DeCarlo et al., 2006).

Instrumental uncertainties may arise due to electronic
noise or to changes in the performance of various instrumental components.In the latter case, which for example may reflect changes in detector sensitivity or long-term performance fluctuations, the significance of such variations can be evaluated by Allan-variance analysis (Allan, 1966;Werle et al., 1993;Ng et al., 2011;Onasch et al., 2012).Whereas the Allan variance decreases with increasing averaging time for an ideal mass spectrometer (where only ion-counting uncertainties exist), it eventually increases with longer averaging times in real instruments.This increase reflects the introduction of additional error terms from slowly varying contributors such as electronics temperature or detector stability (Allan, 1966;Werle et al., 1993).Conversely, the minimum in a plot of Allan variance against averaging time indicates the maximum timescale over which instrumental uncertainties can be considered negligible.
For an SP-AMS, Onasch et al. (2012) have shown that σ counting dominates instrumental uncertainties for averaging times below 100 s in a filtered-air sample.Since this is longer than typical HR-AMS and SP-AMS sampling times (internal backgrounds are taken automat-ically), instrumental uncertainties should therefore be small relative to counting uncertainties.However, this may not be true for instrumental uncertainties that are dependent on signal loadings, such as those due to background measurements or detector saturation.
4. Finally, analysis uncertainties reflect the confidence with which mass-spectral peak areas can be determined.These uncertainties may comprise both biases and imprecisions.The remainder of this manuscript focusses on these uncertainties in PIKA, with an emphasis on the peak-integration imprecision which is most relevant to PMF (and other least-squares-minimization techniques).The next section describes the PIKA fitting procedure to provide a basis for this discussion.

Constrained peak fitting in PIKA
In PIKA (up to the current version, 1.11C), the signal intensity y due to a specific ion is considered to arise from a peak φ, together with some noise σ y , for each measured ion-timeof-flight x (corresponding to different m/z): To a first approximation, the peak φ has a Gaussian shape and may be modelled by where h is the peak amplitude (peak height), µ the mode and mean of the Gaussian (peak location), and w the standard deviation (SD; peak width).These parameters may be estimated by least-squares fitting to the data.
In practice, the Gaussian model is modified to account for peak broadening, skewness, tailing, or other instrumental non-idealities (DeCarlo et al., 2006) by defining a peakshape function v.The v is determined empirically by averaging a large number of normalized, well-resolved peaks from a given data set and may be visualized as a one-dimensional vector of correction factors in normalized x space (x norm.= [x − µ]/w).Including v in Eq. ( 2) defines the pseudo-Gaussian function (DeCarlo et al., 2006), To improve the robustness of the PIKA fitting routine against poorly resolved peaks and noisy data, some of the parameters in Eq. (3) are constrained during peak fitting.The v is determined as described above, µ is obtained from an m/z calibration, and w is from a peak-width parameterization, w(m/z).These are obtained as follows.
The m/z calibration is achieved by fitting Eq. ( 2) to userselected background peaks.The fitted peak locations µ in time-of-flight space are calibrated to their known m/z following the procedure described by DeCarlo et al. (2006).Separate m/z calibrations are obtained for every mass spectrum.In practice, these calibrations are applied to predict peak locations in ion time-of-flight space before fitting the raw data.We therefore refer below to "µ-prediction errors" rather than "m/z-calibration errors" except when specifically discussing m/z calibrations.Although all peaks were fitted in ion-time-of-flight space below, the discussion refers to peak m/z for clarity.
The w(m/z) calibration is also obtained by fitting Eq. ( 2), but to a separate set of peaks.This set of peaks is carefully selected to ensure that only single, well-resolved peaks of unambiguous composition are considered.The fitted peak widths w are averaged before being parameterized by a (typically linear) calibration curve, as described by DeCarlo et al. (2006).In the present analysis, the w(m/z)-calibration procedure was slightly modified to improve its robustness against poor-quality peak fits, as described in detail in Corbin et al. (2015a) and briefly in the Appendix.
Thus, the three inputs to Eq. ( 3) are defined from three different calibrations on the data.These calibrations are fundamentally different: the w(m/z) and v calibrations are determined once for the entire data set, while the m/z calibration is determined for each individual mass spectrum.Variability in the accuracy of the m/z calibration may therefore lead to variability in the analysis.Also, different peaks are used for all three calibrations, so that their prediction errors may also differ.
With the inputs described above, Eq. ( 3) is fitted to estimate h.An example is shown in Fig. 1, showing the CO + 2 signal at m/z 44 in the lower panel and the fit residuals in the upper panel.The peak spans only 2-3 detector bins (corresponding to 4-6 ns), which was typical for m/z in the range 15-75 for this specific instrument.Other studies have reported slightly lower m/z resolutions and correspondingly a slighly higher number of detector bins representing each peak (e.g.DeCarlo et al., 2006;Sun et al., 2010;Ortega et al., 2013).The conclusions drawn at the end of this study are independent of this detail.
The fitted h is used by PIKA to estimate the area A of each peak via the Gaussian integral as A(G) = hw √ π , which leads to (Sueper et al., 2011) where A G 0 and A f 0 are the respective integrals of the standard Gaussian and pseudo-Gaussian distributions.These standard integrals are defined by Eqs.
(2) and (3) with unit h and w, and µ = 0.The factor k DC is a correction for the massspectrometer duty cycle to account for the fact that lighter ions will be transported faster than slower ions into the mass spectrometer prior to time-of-flight measurement and, consequently, reside in the extraction region for shorter times (Hings, 2006).The ratio A f 0 /A G 0 is typically close to unity.After estimating A, PIKA currently estimates the uncertainty in A from the square root of the number of ions associated with the signal, according to an assumed Poisson distribution of errors (Allan et al., 2003).
In the HR-AMS, more than one peak is typically observed at each integer m/z.These peaks are modelled as a linear superposition f T of pseudo-Gaussians with similar w (Sueper et al., 2011): (5) The uncertainty of fits to Eq. ( 5) with j > 1 (multiple overlapping peaks) is much more complex than the case where j = 1 (≡ well-resolved peaks).
The next section therefore focusses on the case of wellresolved peaks, before Sect. 5 discusses the overlapping-peak case.
3 Causes of peak-fitting uncertainty: well-resolved peaks in a real data set

Integration uncertainty for well-resolved peaks
The integration of fits to well-resolved pseudo-Gaussian peaks via Eq.(4) will lead to an uncertainty, which, if the fractions σ h / h and/or σ w /w are sufficiently large, may contribute significantly to the overall uncertainty of integrated mass-spectral signals.
In Eq. ( 6), the uncertainties in A f 0 and k DC are considered negligible, since the integral A G 0 is known exactly; the integral A f 0 is also known exactly for a given v; and the uncertainty in k DC depends only on the stability of the massspectrometer voltages, which fluctuate negligibly for the time periods over which data are collected (Sect.2.1).In addition, h and w have negligible covariance as they are determined via separate and independent calibrations (Sect.2.2); the w(m/z) calibration requires, and can be used to validate, the assumption that w is independent of h.
The value of σ w may be directly estimated from the peak-width calibration procedure via the uncertainties in the calibration-fit coefficients.For the test data set discussed below, this approach indicated σ w /w ≈ 2.5 %.Such a percentage uncertainty is important as it scales with signal differently to the typically used Poisson uncertainty, increasing linearly with the number of ion counts rather than as the square root.
The estimation of σ h is much more complex than σ w .Whereas σ w may be estimated directly from the calibration fit, σ h reflects the imprecision of the constrained PIKA fitting procedure (Sect.2.2), the constraints of which are predicted by two separate calibrations (peak width and location) as well as an empirically defined peak shape v.

Theoretical consideration of single-peak fitting errors
In this subsection we describe the theoretical basis on which the RMSE, defined below, has been interpreted in Sects.3.3 and 3.4.The focus is on well-resolved peaks; overlapping peaks are addressed in Section 5. Since the width, location, and shape of the PIKA pseudo-Gaussian fit function (Eq. 3) are predefined by different calibrations, the exponential term of Eq. ( 3) reduces to a transformation of the x variable: where f 0 is defined by Eq. ( 3) with h = 1 and with µ, w, and v given by the calibrations described in Sect.2.2.A fit to Eq. ( 7) is equivalent to a simple linear regression.(Indeed, the newest version of PIKA directly performs such a regression.)An uncertainty estimate for h could thus be obtained directly from the regression, but this estimate would not account for bias in the fit.Such bias must be accounted for, because when such bias varies from fit to fit (i.e. from mass spectrum to mass spectrum for the same peak), it produces an imprecision in h.Such a varying bias is to be expected, because a new f 0 is defined for each fitted ion.The accuracy of f 0 may vary in this context due, for example, to variations in the accuracy of the m/z-calibration equation which is obtained for each mass spectrum.
The influence of such variations on the imprecision of the fitted h values cannot be estimated directly from a single fit but must be considered in the context of the whole data set.It can be expected, however, that (in the absence of noise) errors in h due to f 0 will be proportional (scale linearly with h) since f 0 is scaled by h during fitting.
To quantify the error in a given fit of f , we use the SD of the fit residuals, the fit root-mean-square error (RMSE): As the RMSE of a single peak is the main quantity of interest below, the range 1 ≤ i ≤ j was limited to 2 SDs on either side of the peak centre (µ ± 2w), representing the trimmed variance of the residuals (e.g.Wilks, 2011).
The RMSE is not used to directly infer the error in the fitted h but rather as a diagnostic with which the causes of errors in f 0 may be elucidated and understood.Based on this understanding, the imprecision in h is then estimated.
For a sufficiently large sample, the expected value of the squared RMSE is the sum of the model variance and the squared model bias (Wilks, 2011).In the context of this discussion, this statement may be illustrated as follows.The RMSE represents the expected value of a fit residual, r i , which is related to the fitted and true peak functions h fitted,i f 0 and h true,i φ 0 as where h fitted,i and h true,i are scalars to the estimated and true unit-height peak functions f 0 and φ 0 respectively, and σ y,i represents noise in the data due to ion counting or background subtraction errors.Letting f 0,i = φ 0,i + ε i , where ε i is the error in f 0 at each data point resulting from imperfect knowledge of the true peak shape, For small peaks, counting uncertainties dominate the fit residual: (h true,i φ 0 )/σ y,i − → 0, thus r i − → σ y,i in Eq. 10 (cf.Fig. 11).
For large peaks, the counting uncertainties σ y,i become negligible relative to h fitted,i ε .In this situation, the slope of a plot of r i against h fitted,i will be where dh true,i /dh fitted,i = 0 if the peak shape is independent of the peak intensity, as was already assumed (Sect.2).This assumption is discussed further in Sect.3.4.Thus, for signals large enough for noise to be negligible, a plot of r i (or an estimator of r i , such as the RMSE) against the fitted peak height h fitted may show a linear slope where errors in the scaled peak-shape function f 0 dominate counting errors.The linearity arises because of the linear scaling of f 0 by h f .If a unique f 0 is prescribed for each fit, as is the case in PIKA, then variability within the set of prescribed f 0 may lead to an overall imprecision σ h in the set of fitted h fitted .Below, we refer to h fitted simply as h.For fits to well-resolved ions, we plot the RMSE against h to evaluate the factors that lead to the constant relative error defined in Eq. ( 11) in order to build an understanding on which the corresponding σ h may be estimated in Sect. 4.

Identification of single-peak fitting errors using fit RMSE
The RMSE of a number of well-resolved peaks in the test data set are plotted in Fig. 2. Each point in the figure represents the RMSE of a fit of Eq. ( 7) to the data.The figure includes seven well-resolved peaks based on their being both well-resolved from any neighbours and present at a wide range of signal intensities.The mass spectra have been background subtracted before fitting as described in the Appendix.Background subtraction was performed to remove inconsequential differences between the ions, for example due to signals from background CO 2 gas.Other ions had very small background signals regardless.The peaks in Fig. 2 span a range of different m/z, as indicated by the integer m/z values shown in the legend, and represent a range of different species.For example, C + ions were formed after BC vaporized at ∼ 4000 K, whereas C 2 H 3 O + and C 3 H + 7 ions were formed after organic PM vaporized below 873 K (600 • C) (Corbin et al., 2015a).In contrast to all other ions, these latter two organic ions are found at the same integer m/z and were therefore fitted simultaneously as a linear sum in PIKA (Eq. 5 with j = 2).This point is returned to in Sect. 5.
Two distinct trends are evident in Fig. 2. First, the RMSE approaches an asymptotic value for low peak heights (∼ 1 counts s −1 bin −1 ; cps bin −1 ).This approximately constant RMSE (σ y ≈ 0.2 cps bin −1 ) is representative of noise in the data y.Second, the RMSE shows a constant slope for highsignal peaks, indicating an approximately constant relative RMSE for each peak (RMSE/ h ≈ 3 %).This illustrates the importance of fitting-function errors during the fit (Sect.3.2).The constant RMSE and constant relative RMSE are respectively depicted by the dotted and dashed lines in Fig. 2, as well as their quadratic sum.
The constant RMSE/ h for high signals suggests that σ h / h may also be constant.Thus σ h may also scale linearly with signal, as was the case for σ w /w (Sect.3.1), and may significantly influence the overall peak-integration uncertainty for high signals.The next sections therefore aim to obtain an understanding and quantification of σ h / h for incorporation into the overall HR-AMS uncertainty.

Impacts of fit-parameter errors on the RMSE of single peaks
The source of the constant relative RMSE in Fig. 2 was argued via Eq.( 7) to be most likely due to errors in the predefined pseudo-Gaussian function f 0 .To elucidate which of the parameters defining f 0 have the greatest impact on the errors of the resulting fit, imprecisions or biases were manually added to each of several input parameters in the PIKA analysis procedure as follows.
The original magnitude of each error was estimated directly from the data.Based on these estimates, significantly larger uncertainties were added to the data, as specified in Table 2.In most cases, the errors specified in the table were used to define the SD of a Gaussian probability distribution from which a new error was sampled for each analysed peak.
Figure 3 plots the effects of these errors on the resulting RMSE for one exemplary ion, C 3 H + 7 .This ion was chosen simply because it represented a large range of peak intensities (abscissas in Fig. 3); the trends seen in Fig. 3 were observed for all of the ions in Fig. 2 (not shown).The magnitudes of the errors used to generate the figure are highlighted in boldface in Table 2 and were chosen so as to give a visible change in the RMSE graphs (where possible), not to represent realistic errors.
With this approach, multiple potential sources of the constant relative RMSE term can be eliminated: noise in the predicted peak width w (Fig. 3b), errors in the slope of the subtracted linear baseline (Fig. 3d), and the use of a different AMS vaporizer (Fig. 3e) did not alter the magnitude of the relative RMSE.
Conversely, two potential sources of the constant relative RMSE can be identified: noise in the predicted peak location µ (Fig. 3f) and errors in the peak-shape v (Fig. 3g and h).In these three cases (Fig. 3f-h), a relative RMSE of ∼ 15 % was observed.
The relative µ-prediction errors necessary to achieve this ∼ 15 % relative RMSE were 5-10-fold larger than typical µ-prediction errors; the errors in v necessary to achieve this ∼ 15 % relative RMSE were 2 orders of magnitude larger than the maximum distance between the best estimate of v and the data used to derive it, which was 0.4 %.This suggests that m/z-calibration uncertainties play a larger role than peak-shape uncertainties in a real data set.This difference in sensitivity is not surprising given that µ is part of the exponential term in Eq. ( 3) while v is a linear term.In the next section, the fitting procedure was altered to prove that the majority of the fitting error was due to µ-prediction errors.
One additional implication of Fig. 3g and h is that RMSE/ h is a function of v. Given that Fig. 2 showed that this fraction was nearly constant for high signals, we infer that the peak shape was nearly constant across this range of signals.
If v was independent of signal intensity, then the individual ions comprising each peak interacted negligibly within the instrument, which provides justification for the assumed behaviour of overlapping peaks as a linear sum in Eq. ( 5).

Impacts of fit constraints on single-peak fitting errors
To explore the impact of errors in µ prediction on the fit RMSE, the fitting procedure was altered to allow µ and/or w to be varied during fitting.The peak shape v could not be meaningfully varied.Allowing µ to vary by ±20 ppm during fitting reduced the fit RMSE by almost 1 order of magnitude at high signals (Fig. 4, red triangles), indicating that the majority of the fitting error was due to errors in the predicted µ (which result from both imprecisions and biases in m/z calibration).The RMSE at low signals was virtually unchanged, since it was dominated by noise in the data (Sect.3.3).While Fig. 4 illustrates this result using C 3 H + 7 , these conclusions were verified for all of the well-resolved ions discussed above.
Further relaxing the µ constraint to ±50 ppm did not further reduce the RMSE.Conversely, reducing the constraint to ±10 ppm resulted in a change intermediate between the 0 ppm (fully constrained) and ±20 ppm constraints, suggesting that the true accuracy of the m/z calibration was on the order of ±15 ppm.This value does not correspond to the imprecision of the m/z calibration, as discussed in the next section.
Allowing w to vary during the fit by ±5 % (2 σ w ) had no observable effect on the RMSE (Fig. 4).Although this re-   (a-d, f-h).The added errors are defined by the highlighted values in Table 2.The laser vaporizer of a dual-vaporizer SP-AMS (see Corbin et al., 2015a) was on for all data except those of panel (e).B.L. is baseline.
sult may appear to contradict the fact that a significant uncertainty in the w calibration was estimated during calibration (Sect.4.3), it is fully consistent with the only minor changes in RMSE observed when large errors were added to w in Sect.3.4 (Fig. 3b).Thus, although uncertainties in w do not strongly influence the fitted h, they lead to uncertainties during the peak integration by Eq. (4) (cf.Eq. 6).
When both w and µ were allowed to vary during fitting, the RMSE behaved similarly to the case where only µ was allowed to vary (i.e. the red triangles in Fig. 4).In this case, some linear dependence of the RMSE on the fitted peak height remained, suggesting that f 0 still had some influence on the RMSE.This remaining dependence is attributed to errors in the peak-shape factor v. Since the empirically defined Table 3. Summary of h-fitting biases and imprecisions from data and simulation.The second column, µ-prediction error, reflects errors in m/z calibration as estimated from the test data set for each ion (Fig. 5).The third to fifth columns show different Monte Carlo estimates of the error in fitted h as bias, and imprecision pairs (b h , σ h ).Respectively these different estimates are the best estimate, an estimate where b h is not taken into account, and the best estimate when broader peaks were simulated (resulting in twice the number of measurements per peak and representing potential differences between instruments).in response to changes in the fitting procedure.The normal PIKA fitting procedure (abscissa) is compared to procedures where µ was allowed to vary by ±20 ppm (red ) and where w was allowed to vary by ±5 % (grey +), or both were allowed to vary (blue •).Lines highlight the trends expected for no decrease in the RMSE (1 : 1) and a factor-of-10 decrease (1 : 10).

Percentage error in
v (a vector of more than 100 values) could not be allowed to vary during fitting as µ and w were in Fig. 4, its influence on the RMSE trends could not be explored in this context.If the remaining RMSE trend was due to errors in v, these errors had a much-smaller impact on the RMSE (and therefore the goodness of fit of Eq. 3) than the errors in µ prediction, so they are not discussed further.

Estimation of µ-prediction (m/z) errors from single-peak fits: consequences for h-imprecision estimation
When the predicted peak location µ predicted was allowed to vary during fitting (Sect.3.5) the relative RMSE was significantly reduced in the high-signal regime.The final fit therefore represented a significantly better model of the data, which is interpreted as an improvement due to a reduced error in the µ.The fitted peak location, µ fitted , is therefore interpreted as a good approximation to the true peak location, µ true , and used to estimate errors in µ prediction as e µ ≈ (µ fitted − µ predicted ) in the current section.Limitations of this estimation approach are discussed in Sect.6.The dark-shaded data in Fig. 5 show the distribution of the estimated µ-prediction errors for peaks outside of the noise regime, defined as h fitted > 20 cps/bin from Fig. 2. For this analysis, µ was allowed to vary by ±40 ppm.If the aggregated e µ data are fitted by a Gaussian function, the mean appears to be virtually 0 (fitted value: −0.5 ± 0.8 ppm), suggesting zero bias in µ predicted .However, the bias for each individual ion was not 0, as shown by the light-shaded data in the same figure.The µ fitted for each ion showed significant biases (mean different from 0) as well as imprecisions (significant spread relative to the mean).The magnitude of these biases and imprecisions were estimated by a Gaussian fit in each case, with the fitted values shown in Table 3.The imprecisions in µ predicted are generally of similar magnitude to the biases, and the biases show both positive and negative values.These biases must therefore be taken into account when estimating h-fitting imprecision for individual ions.
Figure 6 plots the data for m/z 43, C 2 H 3 O + (m/z 43.0184), and C 3 H + 7 (m/z 43.0548) that were shown in Fig. 5 as a scatter plot.As these two ions are of similar m/z, but are nonetheless well resolved with a separation of ∼ 7 standard deviations (cf.Cubison and Jimenez, 2015), it was hypothesized that their µ-prediction biases may have  ).Lightshaded data represent specific ions and dark-shaded data the aggregate of all ions.The light-shaded data are scaled similarly, so that their relative areas represent the relative number of data used to construct them.The mode and widths of the Gaussian fits to each histogram are given in Table 3.
been approximately equal.Such approximate equality would have allowed µ-prediction biases to be fitted as a single free parameter during fitting of Eq. ( 5).Alternatively, a single value for the µ-prediction bias could have been assumed during Monte Carlo analysis (Sect.4).The lack of a 1 : 1 trend in Fig. 6 (indeed, a slight negative trend is evident) suggests that the µ-prediction biases for nearby peaks cannot be assumed to be equal.This unexpected result may be related to the sensitivity of the fits to the location of the mode of a peak relative to the nearest detector bin, which is discussed in Sect.4.1.The method by which e µ was estimated may also play a role, but to some degree this method must also represent the sensitivity of the fitting algorithm to the data.Since this sensitivity also influences the ultimate quantity of interest, σ h , this conclusion would remain true regardless of the accuracy and precision of the e µ estimate.Moreover, we emphasize that ion-dependent biases in m/z calibration are not unique to this study, as discussed in Sect.6.
Although it is readily apparent that a µ-prediction bias may lead to a bias in the fitted h for a given ion, it is less apparent that such a bias also significantly increases σ h for any given µ-prediction imprecision.This occurs because the slope of a peak increases with increasing distance from its mode (for small distances), such that the variation in fitted height is larger for peaks fitted further away from their mode.The magnitude of this effect is illustrated in Fig. 10, which is discussed below.It is therefore essential consider µ-prediction biases when estimating the magnitude of σ h .

Monte Carlo estimation of σ h for well-resolved peaks
A Monte Carlo approach for the estimation of peak-fitting uncertainties was developed based on the above discussion.With this approach, σ h is directly evaluated by sampling µprediction errors (both m/z-calibration biases and imprecisions), repeatedly fitting a selected peak, and calculating the standard deviation of the resulting set of fitted h.Below, this approach is described in more detail and used to investigate the µ-prediction errors observed in the test data set.Then, the conditions under which the approach may be generalized to the case of overlapping peaks are explored.
The Monte Carlo approach used to evaluate σ h in the test data set was evaluated by simulating peaks via Eq.(3) using the m/z axis of a mass spectrum from the test data set.For each simulated peak, a different m/z axis was randomly selected.The simulated peaks were generated using the peak shape v and width w expected for this data set, and the Gaussian noise described in Sect.3.3 was added to the data.The simulated peaks were then fitted to Eq. ( 3) with µ intentionally constrained to erroneous values.These erroneous µ constraints were obtained by sampling from a Gaussian distribution with mean and SD given by the fits in Fig. 5.For the Monte Carlo estimation of σ h for standard analyses, this approach must be modified slightly because m/z-calibration biases are unknown, as discussed further below.7 fits in the test data set (symbols) and to simulated data (line, mean; shading, SD).Peaks of the empirically determined peak shape were simulated on the same m/zaxes as the measurements and were fitted using Eq. ( 3) after adding noise (0.35 cps bin −1 ) and emulating bias and imprecision errors in the location constraints (Table 3).For each point, multiple simulations on randomly selected m/z axes were performed to estimate the standard deviation of the RMSE (blue shading).
The RMSE of these fits to the simulated data are plotted in Fig. 7 for C 3 H + 7 .Each simulated peak height was fitted 100 times, each time with a different sample of µ-prediction and data-noise errors and on a different m/z axis.Increasing this number of samples did not affect the results.The figure shows the resulting mean (white line) and SD (light-blue shading) of the RMSE, which are in excellent agreement with the data.
It was noted in Sect.3.5 that some small errors in v were likely present.Although no physical basis for the functional form of such errors was available, the impact of errors in v was investigated by adding arbitrary functions to the true peak shape.This allowed the trends in Fig. 4 for the relaxedµ constraint case to be reproduced but made no visible difference to Fig. 7. Errors in v were therefore omitted from the model.

Imprecision for well-resolved peaks with known µ-prediction errors
The blue points in Fig. 8 (case A) show the σ h corresponding to the RMSEs shown in Fig. 7.The imprecision increases as h becomes smaller due to the noise in the data but reaches an asymptotic value as h becomes larger.As noted above, these points represent random samples from the entire test data set.
In practice, it is desirable to estimate σ h on a case-by-case basis for each peak in each mass spectrum.Such an estimate .The imprecision in C 3 H + 7 fitted peak heights, σ h , estimated via the Monte Carlo approach described in the text.Although counting imprecisions have been omitted so as to illustrate the influence of the different approaches (a-e), Gaussian noise with standard deviation 0.35 cps bin −1 was added to each mass spectrum to allow comparison with Fig. 7.The different approaches (a-c), detailed in the figure legend, illustrate the need to consider the position of the peak relative to the sampling grid ("bin-to-mode distance") when simulating peaks comprised of relatively few data points (this peak is illustrated in the upper-left panel of Fig. 10).The approaches (d) and (e) illustrate the σ h that would be estimated in the absence of exact knowledge of the m/z-calibration bias. is shown by case B in Fig. 8, which was obtained by performing the Monte Carlo approach described above except the random selection of different m/z axes was not performed.Different m/z axes showed different asymptotic values; the selected axis was chosen for its visual distinction.This difference does not represent real variability in the data: again, only the m/z axis was taken from the data set and the peak itself was simulated.Rather, the difference was due to a shift in the relative distance between the data points representing the peak and the m/z axis (the "bin-to-mode distance"), which is arbitrary and can vary between mass spectra.Case C demonstrates this fact by repeating case B while shifting the mode location of the peak by a randomly selected fraction of the bin spacing between 0 and 1 for each Monte Carlo fit.The result is an estimate of σ h that is comparable to the entiredata-set case and represents fit-function errors rather than the bin-to-mode distance.
For overlapping peaks, the µ-prediction imprecision and bias is generally not known.Case D repeats case C but without the µ-prediction bias.The result is an imprecision estimate that is much lower.For case E, a much higher imprecision of 20 ppm has been used, based on the recommendation from Sect.4.2 that the estimated µ-prediction imprecision be increased to allow unbiased estimation of σ h when µ-prediction biases are unknown.Normalized and centred probability distributions of the simulated imprecision in fits to well-resolved peaks from the test data set, using the µ-prediction biases and imprecisions given in Table 3. Distributions were centred by subtracting the mean simulated error, so that only fitting imprecisions (relevant to PMF) are shown.Simulations were performed on randomly selected m/z axes from the data set.
In Fig. 8, the standard deviation of multiple fits was used to represent σ h .However, the distribution of errors comprising σ h was not normally distributed, as shown in Fig. 9. Figure 9 includes all seven of the well-resolved peaks discussed above and only represents signals much larger than the noise level, since each followed the same asymptotic behaviour shown in Fig. 8 and since counting errors must ultimately be combined with peak-integration errors at low signal-to-noise ratios (Fig. 11).A large number of iterations (5000) were performed for each peak so that histograms could be plotted in detail.The mean fitting error (bias) has been subtracted from each distribution so that the plot represents σ h .The errors are normalized to the absolute peak height, as they were a constant fraction of the height (as expected from Sect. 3).For all ions, the limiting case of very high ion signals was simulated.The reader is referred to Cubison and Jimenez (2015) for a discussion of the effects of ion-counting uncertainties on fitting imprecision.
Each probability distribution in Fig. 9 shows a very different skewness.These differences are largely controlled by the µ-prediction bias and imprecision, which may cause the predicted peak location to be consistently away from the peak mode.Away from the mode, the peak itself slopes more steeply and a small µ-prediction imprecision leads to a large variability in the fitted height.This fact means that a greater imprecision results from a greater bias in the m/z calibration.The µ-prediction bias is therefore an important component of the imprecision of the fitted h.Without including this bias in estimating σ h , the resulting imprecision estimates would be considerably different (Table 3).
The impact of the µ-prediction biases discussed above on σ h will be reduced for broader (lower m/z-resolution) peaks, since such peaks are less steeply sloped.Broader peaks are also represented by more points in the mass spectrum, which has a major impact on the imprecision: for the case of C 3 H + 7 , increasing the peak width by a factor of 1.5 (which doubled the number of data points representing > 1 % of the peak height from 4 to 8) decreased the imprecision from 1.6 to 0.2 % (Table 3).This effect would not necessarily be reduced by increasing the number of points per peak without changing the mass-spectral resolution (Hilmer and Bothner, 2011) but instead only by reducing the µ-prediction errors.

Imprecision for well-resolved peaks with unknown µ-prediction errors
A non-negligible m/z-calibration bias is anticipated for any given mass-spectral peak, since ion trajectories are typically imperfectly described by the calibration function as discussed in Sects.3.6 and 6.We explored the sensitivity of σ h to this bias by calculating σ h for the three exemplary peaks shown in the top row of Fig. 10, for a wide range of µprediction bias and imprecisions.Figure 10 thus illustrates the range of imprecision for which a given m/z-calibration bias becomes negligible: for the range of m/z-calibration biases where σ h remains similar along a vertical cross-section of the middle panels of the figure, the actual value of the bias term need not be known.
To place Fig. 10 in context, the µ-prediction biases and imprecisions for ions in the test data set (Table 3) are shown in the central column.In the left-and right-hand side columns, only the µ-prediction errors representing the specified ions are shown.The central column was generated using a muchhigher data-point density than was observed in the test data set and represents a higher data-sampling rate, as may be observed in other instruments.It also equivalently represents a higher m/z ion or a lower mass-spectral resolution instrument.The upper row of plots in Fig. 10 includes a horizontal dashed line to illustrate the peak width (w in Eq. 3).Also shown in this row are red vertical bars spanning ± 17 ppm, which is the standard deviation of the aggregated error estimates for well-resolved peaks in the test data set (shown in the lower-right plot of Fig. 5).The grey vertical bars span ± 10 ppm to illustrate the range of biases observed in Table 3. (The position of a peak relative to the grey bars will, by definition, change only between ions and between data sets, not between samples.) The second row of plots in Fig. 10 plots σ h for each of the three cases.Because the peak is nearly Gaussian, the plot is virtually symmetrical about the zero-bias line.Neverthe- Figure 10.Response of the peak-fitting imprecision σ h to variations in m/z calibration imprecision and mass accuracy, i.e. to variations in µ-prediction imprecision and bias.Each column corresponds to the simulated ion named and depicted in the first row respectively: C 3 H + 7 simulated on a normal m/z axis, C 3 H + 7 simulated with much a greater data point density (reflecting a broader peak and/or faster sampling rate), and C 5 H + 11 simulated on a normal m/z axis.The second row of plots depicts the Monte-Carlo-estimated σ h (standard deviation of 300 fits with varying bin-to-mode distance and negligible counting noise) for each imprecision and bias (represented via the standard deviation and mean of a Gaussian distribution) specified on the horizontal and vertical axes respectively.The third row of plots depicts the effect of bias on σ h : each point on the third-row images are normalized to σ h,b = 0 , i.e. the horizontal line of zero bias from the respective secondrow plot.The pink + represent the µ-prediction bias and imprecision estimated from the data, shown in the left and right columns for the respective ions, and in the central column for all seven ions in Fig. 9.The apparent noise is due to the variation of the bin-to-mode distance (see text).Vertical cross-sections on the second and third rows of plots correspond to the range of σ h which may exist when µ-prediction bias is unconstrained.less, we have plotted both negative and positive biases because this is the space in which the true, unknown biases of all peaks will lie.
The third row of plots in Fig. 10 shows the effect of µprediction biases on σ h , relative to the no-bias case.That is, this row shows σ h,with bias divided by σ h,bias=0 , where the former quantity is the σ h obtained when considering µprediction biases and the latter quantity is the σ h obtained when neglecting those biases.It is clear that the larger the m/z-calibration imprecision, the smaller the importance of the m/z-calibration bias.
Thus, the bias need not be known or estimated for the accurate Monte Carlo estimation of σ h ; it is only necessary that the m/z-calibration imprecision employed for the Monte Carlo estimate is large enough that σ h lies within the regime where the influences of m/z-calibration biases are negligible.This will result in σ h values that are overestimated by a few percent but that are consistent between peaks with different m/z-calibration bias.For the biases observed in Fig. 10, a reasonable estimate for an m/z-calibration imprecision in this regime may be 20 ppm; an example of the resulting σ h is shown in shown in Fig. 8, case E.
Consistent estimates of σ h between peaks with different calibration biases is important during least-squares fitting.This statement may be justified by the conclusions of Paatero and Hopke (2003), in particular the conclusion that underestimating the imprecision of certain variables during PMF can have significantly harmful effects.Those authors also concluded that overestimating uncertainties may have potentially positive effects.Both conclusions provide clear support for the present method.
An approach to estimating σ h which does not require ionspecific estimates of m/z-calibration biases or imprecisions is also important during fits to multiple overlapping peaks, since the estimation of m/z-calibration biases in such a context (Sect.3.6) may be difficult or impossible.This is further discussed in Sect. 5. Example of the relationship between the uncertainty in the integrated area of for a single, well-resolved peak and its absolute area.The example uses real data for CO + 2 and shows two cases; first considering only counting uncertainties (red) and second considering both counting and peak-integration uncertainties (black), following Eq.( 13).The upper panel shows the absolute imprecision; the lower panel the relative imprecision.The horizontal dotted line illustrates the more-realistic asymptotic behaviour of the new approach.

Overall peak-integration imprecision: example for a well-resolved peak
With σ w /w determined as ∼ 2.5 % (Sect.3.1) and σ h / h estimated by the Monte Carlo method described above (Sect.4), for both well-resolved and overlapping peaks, the overall imprecision in the peak integration discussed in Sect.3.1 can be estimated from Eq. ( 6) as where σ h / h is approximately constant (on the order of a few percent) for a well-resolved peak within a given data set and may become much larger as peak overlap becomes important (Cubison and Jimenez, 2015).σ A is considered independent of the Poisson counting uncertainties σ p discussed in Sects.2.1 and 5, so that the overall HR-AMS uncertainty may be expressed in units of ion counts per detector bin as For well-resolved peaks, the first term in Eq. ( 13) scales linearly with signal, whereas the second term scales with the square root of the signal.Therefore, even for well-resolved peaks, the first term dominates at high signals.That is, in this case peak-integration imprecision dominates ion-counting imprecision.For overlapping peaks, peak-integration imprecision may become very large for much smaller signals.
While σ h / h is most accurately estimated on a case-bycase basis using the Monte Carlo approach outlined above, we illustrate the importance of peak-integration errors by taking σ h / h ≈ 4 % as a representative value for well-resolved peaks in the current data set (estimated based on Sect.4.1), which together with σ w /w ≈ 2.5 % gives σ A ≈ (4.7 %)A ( 14) for well-resolved peaks in this data set.This is shown in Fig. 11, which has been obtained by programming Eq. ( 13) into PIKA using the value for σ A given above.(As is standard in PIKA, the calculations have accounted for additional details related to sampling time, baseline noise, and massspectral duty cycle (Allan et al., 2003;Sueper et al., 2011).Due largely to sampling-time correction (Allan et al., 2003), the asymptote of Fig. 11b is less than 4.7 %.) Fig. 11b illustrates the essential difference between fitting and counting errors.Whereas the relative uncertainty of Poisson errors (∼ √ n) falls to 0 as the signal increases, the relative uncertainty of fitting errors (∼ n) tends to an asymptotic value as signal increases.This feature strongly affects the relative importance of high-signal data during uncertaintyweighted fitting.This importance will be even greater for peaks affected by overlap, for which fitting errors may increase rapidly and nonlinearly.

Influence on positive matrix factorization results
The arguments presented above clearly show that m/zcalibration limitations lead to a linear (fractional) imprecision term during the constrained peak-integration procedures of PIKA.This imprecision significantly increases the overall imprecision in a resulting data matrix; in particular, fractional imprecisions become more significant than ion-counting uncertainties for high signals, and overlap errors may be larger still.Thus, omitting this imprecision term from the uncertainty provided to PMF leads to an overweighting of highersignal data, which may bias the PMF solution (Paatero and Tapper, 1994;Paatero and Hopke, 2003).
The importance of high signals means that fitting errors may be especially important for the high aerosol concentrations that may be measured at the roadside (e.g.Dallmann et al., 2014), within combustion plumes (e.g.Cubison et al., 2011), in highly polluted cities like Beijing or Mexico City (e.g.Zhang et al., 2007), or during source studies (e.g.Elsasser et al., 2013;Timko et al., 2014;Corbin et al., 2015a).
Given the variable importance of high signals within different data sets, and the importance of instrument-specific parameters to the peak-integration imprecision as discussed above, an absolute statement of the relevance of these uncertainties in PMF is impossible.Nevertheless, as an example we performed PMF on a synthetic data matrix to demonstrate the significance of addressing peak-fitting errors.
The synthetic data matrix was constructed using the PMF solution presented by Corbin et al. (2015a), which corresponds to the test data set discussed herein.In detail: the factors (mass spectra) and loadings (time series) of the Corbin et al. (2015a) PMF solution were recombined into an errorfree synthetic data matrix.Simulated noise was added to this matrix to represent Poisson and peak-fitting imprecisions (given by Eq. 13) by sampling from Poisson-and Gaussian-noise generators (Igor Pro, version 6.3) with an SD of 5 % of the peak height.For simplicity, peak-overlap errors were not included.PMF was performed as described in Corbin et al. (2015a).In particular, low signal-to-noise variables were downweighted (Paatero and Hopke, 2003) and the robust mode of PMF was used (Paatero, 1997), consistent with standard practice in the AMS community (Zhang et al., 2011).
When this synthetic matrix was factorized using only a Poisson imprecision term to weight the data (i.e. with the largest signals overweighted), the residual matrix showed significant outliers for the highest signals.For example, the largest residual outliers for CO + , which was the highestsignal ion in the synthetic matrix, corresponded to spikes in the signal of that ion.These residual outliers were not present when the synthetic matrix was factorized using the correct imprecision model, Eq. ( 13).
The appearance of the highest CO + signals as spikes in the residual matrix when using the incorrect imprecision model is highly significant.Under normal circumstances, the analyst may have regarded such spikes as "outliers" reflecting transient signals or data-analysis problems, even though (in this case) they were purely the result of underestimated uncertainties.Properly weighting these spikes caused the r 2 between the output and input time series of the lowestsignal factor to increase from 0.54 to 0.74, with similar but smaller increases for the higher-signal factors, which were retrieved with r 2 > 0.91 in the wrongly weighted case and with r 2 > 0.999 in the correctly weighted case.Thus, the influence of high signals on the retrieval of low-signal PMF factors may thus directly influence the mass concentrations estimated by HR-AMS-PMF.This may significantly bias the mass concentrations of specific HR-AMS factors, particularly when they are retrieved in the presence of higher-signal factors.No exact number can be provided for this effect, as it will depend on the relative magnitude of the signals as well as the mass-spectral profiles of each of the retrieved components.

Monte Carlo estimation of σ h for overlapping peaks with unknown µ-prediction errors
It was concluded in Sect.4.2 that intentionally overestimating m/z-calibration imprecision by a modest amount allows the importance of m/z-calibration biases to be neglected in estimating σ h for well-resolved peaks and that σ h is then overestimated by only a few %.This approach is also applicable, without modification, to the case of multiple overlapping peaks.Fig. 12 shows an example of this method, illustrating the peak-fitting and counting imprecisions (σ h and σ n ) for four overlapping peaks.The four overlapping peaks were synthetically generated in a similar manner to the peaks described above (Sect.4), except that counting imprecision was added to the counts in each bin by sampling from a Poisson-noise generator.Errors in µ-prediction (in this context, the sum of µ-prediction bias and a specific value of µ-prediction imprecision) were generated as +5, −7, +10, and −2 ppm for each of the four peaks (in order of increasing m/z); these are considered reasonable given the biases and imprecisions in Table 3. Errors in peakwidth prediction (Sect.3.1) were not included for the sake of generality.
The figure shows that, for the two larger signals, peakfitting imprecisions were on the order of counting imprecision.For the two smaller peaks, peak-fitting imprecisions dominate, with the leftmost peak having a large enough uncertainty to be considered unquantifiable.The influence of counting imprecision on σ h has not been rigorously addressed here.Counting imprecision will only influence σ h when the actual number of counted ions is small enough to deform the peak shape, in which case σ n will dominate σ h regardless of such deformation.

Context and previous work
The largest uncertainty in this analysis was due to the estimation of the biases and imprecisions in µ prediction (which reflect errors in m/z calibration) directly from the data (Sect.3.6).We therefore emphasize that the ion-to-ion variability in µ-prediction biases which strongly influence σ h are not unique to our study.
Biases in m/z calibration, also referred to as mass accuracy, are a general feature of time-of-flight mass spectrometers in atmospheric science (DeCarlo et al., 2006;Cappellin et al., 2010;Junninen et al., 2010;Müller et al., 2011;Yatavelli et al., 2012) and otherwise (e.g.Vorm and Mann, 1994).This means that AMS-specific details such as particle vaporization prior to electron-impact ionization are not their sole cause.These biases may reflect a departure of the ion trajectories from their predicted paths (Guilhaus et al., 2000) but may also result when m/z calibration is performed on low-signal peaks (Cubison and Jimenez, 2015).When the former mechanism is the cause, numerical studies (Cubison and Jimenez, 2015) may underestimate m/z-calibration uncertainties and thus underestimate σ h .Cappellin et al. (2010) introduced additional fit coefficients to the standard m/z-calibration equation and successfully reduced the magnitude of calibration biases.However, this approach is not feasible for all data sets, as it requires multiple peaks to be reliably available for calibration.Moreover, the biases remaining after applying such a modified calibration function would still need to be known for accurate Monte Carlo estimation of σ h ; reducing m/z-calibration bias does not remove the need to account for it.Nevertheless, an improved calibration would reduce the overall σ h .

Reducing σ h
The above conclusions that the major causes of fitting errors in PIKA are errors in peak-location prediction raises the question of whether the fit procedure itself might be improved.
It would be preferable to allow a priori knowledge of calibration uncertainties to be incorporated into the fitting procedure, following Bayesian theory (Gelman et al., 2013).In such an approach, realistic uncertainty distributions could be directly applied to the constraint of µ and translated directly into uncertainty distributions of the resulting h.However, this does not solve the problem of m/z-calibration biases being unknown for the case of overlapping peaks.The development of such an approach is beyond the scope of the present work, in part because the Igor Pro software in which PIKA has been developed over the past decade does not provide the necessary framework.We note that although the relaxation of the µ constraint in Sects.3.5 and 3.6 allowed for uncertainties in µ to be accounted for, the implicit probability distribution assigned to these uncertainties was an unphysical, uniform distribution with unrealistic, discontinuous edges.For the typical case where multiple overlapping peaks are fitted, this approach is not considered robust.
In addition to an improved fitting procedure, an improved calibration procedure would be an obvious recommendation for reducing µ-prediction errors.An accurate calibration requires both a consistent calibrant signal and a consistent peak shape.These requirements were not met by any of the mass-spectral peaks: the only consistent signals were those of background ions from the gas phase, which were relatively few and displayed significantly different peak shapes than particulate signals, likely owing to their originating from generally different regions of the AMS ionization chamber.An improved calibration might make use of an internal standard, for example a polyfluorinated organic (DeCarlo et al., 2006), to be fitted by the same pseudo-Gaussian function used for data analysis (Eq. 3).However, at some point the limited temporal resolution of the ion detector (Hilmer and Bothner, 2011) and the variability of ion flight paths also limit the accuracy of the m/z calibration.

Computation time required for Monte Carlo estimation of σ h
By definition, the Monte Carlo approach invariably requires more time than a direct approach.In large HR-AMS data sets, thousands of mass spectra may be recorded, each containing hundreds of peaks to be fitted.On modern personal computers, fitting may consequently take hours, so performing 100 Monte Carlo simulations during exploratory data analysis can be impractical.A compromise between rapid and reliable results is therefore desirable.
In their work, Cubison and Jimenez (2015) developed a parameterization designed to estimate σ h based on the separation of two peaks, for the reasons noted above.This parameterization does not account for the constant relative imprecision expected for well-resolved peaks (Sect.4.1).Additionally, the parameterization has been designed for the two-peak system.
To minimize the computation time required for the Monte Carlo approach, the following algorithmic approach could be used.First, the approximation σ h / h ≈ constant could be applied for all well-resolved peaks.A percentage value of σ h / h could be estimated using a subset of the data set; weighted least-squares fits will typically be insensitive to the exact value.For cases where two peaks are close enough to possibly overlap, the parameterization of Cubison and Jimenez (2015) may be used to quantitatively define when their overlap is likely to influence σ h (for example, when the parameterization indicates σ h / h > 5 % for any two peaks).When overlap is significant, a Monte Carlo estimation of σ h can be initiated.Further, once a Monte Carlo estimate is obtained for a given set of peak heights, the result may be stored and applied to subsequent peaks of similar height ratios; where more restrictive definitions of similarity will be more accurate but slower.The validity of these approximations should be directly evaluated after initial data exploration by performing full Monte Carlo calculations for each group of peaks in the data set.

Other sources of uncertainty
While only peak-integration and ion-counting uncertainties were addressed in the discussion above, a number of other AMS-specific uncertainties can be identified.Craven et al. (2012) discussed and addressed a number of HR-AMS uncertainties with regard to background signals and overlapping ions.Craven et al. (2012) also developed a data-smoothing approach to evaluate data quality for PMF, rejecting noisy variables.Such an approach may remain useful for the very-slowly changing systems studied by Craven et al. (2012), as it may account for imprecisions other than those caused by peak integration; however, it did not result in improved PMF uncertainty estimates but rather the selective rejection of low signal-to-noise variables.More generally, smoothing approaches cannot be applied to the rapidly changing signals observed during roadside studies, aircraft studies, or laboratory studies on rapidly changing sources, all of which may entail the measurement of the high PM loadings for which peak-integration uncertainties are most important.
Other AMS-specific uncertainties include the fundamental uncertainty involved in converting electronic signals at the detector to ion counts.This conversion is performed after estimating the signal intensity of a single ion, a process complicated by the signal-thresholding applied by the data acquisition software (version 4.0.9).We performed this single-ion measurement procedure on each of the measurement days described herein and obtained results varying by ∼ 20 %.We emphasize that this 20 % would correspond to a potential bias in the integrated areas of all ions, and is fundamentally different to the peak-integration imprecisions discussed extensively above.Moreover, as it is not clear whether this number represents instrumental or procedural variability (the standard procedure resulted in different ions being used for single-ion measurement on each day), it has not been included in Eq. ( 13).In addition, it is worth noting that the newest version of the HR-AMS includes significant hardware improvements which address this issue.
A second HR-AMS-specific scenario arises when the intensity of less-abundant isotope peaks are predicted based on the intensity of more-abundant isotope peaks.This procedure propagates fitting errors across integer m/z, and the corresponding uncertainty should also be propagated to these and neighbouring peaks, as discussed in Corbin et al. (2015a).
Finally, not all ions follow the peak shape established by the PIKA calibration procedure.In particular, thermally generated ions such as K + (Drewnick et al., 2006;Corbin et al., 2015a) or other slowly evaporating species (Salcedo et al., 2010;Craven et al., 2012) may lead to additional uncertainties for this reason.

Conclusions
Peak-integration uncertainties in the analysis of HR-AMS data by PIKA originate from uncertainties in peak-width prediction and in peak-height fitting.The former uncertainty may be easily estimated from the peak-width calibration procedure; the latter by an empirically constrained Monte Carlo approach.
Peak-fitting uncertainties depend most strongly on errors in the m/z calibration used to predict the peak location µ in ion-time-of-flight space.For well-resolved peaks, fitting uncertainties are sensitive to imprecisions in µ, to biases in µ, to the number of data points representing a given peak, and to the position of the peak centre relative to the nearest data point in m/z space.The first two of these factors appear to be most important, but all may be accounted for by empirically based Monte Carlo estimation.
Since peaks are fitted in PIKA by linearly scaling a predefined function, peak-fitting errors for well-resolved peaks also scale linearly with peak height.This leads to a constantrelative-imprecision term in the overall peak-integration uncertainty.Since a constant relative imprecision scales linearly with the ion count n as n 1 , but counting uncertainties scale as n 0.5 , this constant-relative imprecision term dominates counting uncertainties at high signal intensities.For example, in an exemplary data set with an estimated ∼ 4 % imprecision in fitted peak height, 2.5 % imprecision in peak width, and 5 % imprecision in integrated peak area, the relative imprecision term dominated counting uncertainties for well-resolved ions with areas of ∼ 1000 cps.(Sample averaging times may influence this value.)Peak-integration uncertainties for wellresolved peaks will therefore be especially important for the high aerosol concentrations that may be measured near pollution sources or within highly polluted cities.
In a synthetic data set, including the constant-relativeimprecision term during PMF led to a significant improvement in the accuracy of the solution.Thus, although peakintegration uncertainties are much smaller than the uncertainties inherent in AMS-measured mass concentrations or elemental ratios, neglecting peak-integration uncertainties during PMF of data sets containing high-signal ions may significantly bias mass concentrations or elemental ratios of the retrieved factors.that it should be estimated for each data set or at least each new voltage configuration of a given mass spectrometer.The software used to perform this estimation in the present study, written in Igor Pro, is available upon request and will be incorporated into PIKA.Finally, peak-fitting errors may also increase rapidly when peaks overlap significantly, potentially becoming much larger than the uncertainties of well-resolved peaks.It was shown that the fitting imprecision for overlapping peaks may be estimated directly by a minor modification to the Monte Carlo approach described above, that is, by intentionally overestimating the input imprecision such that biases may be neglected.This overestimate results in a moderate overestimate of the peak-fitting imprecision but avoids the ion-to-ion biases that would otherwise result from unquantifiable m/zcalibration biases.

Figure 1 .
Figure 1.Example of a PIKA fit.The raw data (y; counts per second per bin), fit (f ), and residuals (y − f ) are shown.

Figure 2 .
Figure2.The RMSE of standard PIKA fits to well-resolved peaks in the test HR-AMS data set.Numbers in the legend show the integer m/z of these peaks.The dotted line indicates the lower limit of approximately constant RMSE for each ion, the dashed line the upper limit of constant relative RMSE, and the solid line the quadratic sum of the two.

Figure 3 .
Figure 3. Response of the RMSE of a representative ion (C 3 H + 7 ) to the addition of very large errors at various stages of analysis(a-d, f-h).The added errors are defined by the highlighted values in Table2.The laser vaporizer of a dual-vaporizer SP-AMS (seeCorbin et al., 2015a) was on for all data except those of panel (e).B.L. is baseline.

Figure 5 .
Figure5.Distribution of prediction errors in µ estimated from the test data set for each of the ions shown in Fig.2, including only peaks outside of the noise regime (h fitted > 20 cps bin −1 ).Lightshaded data represent specific ions and dark-shaded data the aggregate of all ions.The light-shaded data are scaled similarly, so that their relative areas represent the relative number of data used to construct them.The mode and widths of the Gaussian fits to each histogram are given in Table3.

Figure 6 .
Figure 6.Scatter plot of the estimated errors in peak-location prediction (same data as in Fig.5), e µ , for the ions C 2 H 3 O + and C 3 H + 7 , both found at m/z 43.

Figure 7 .
Figure 7.The RMSE of C 3 H +7 fits in the test data set (symbols) and to simulated data (line, mean; shading, SD).Peaks of the empirically determined peak shape were simulated on the same m/zaxes as the measurements and were fitted using Eq.(3) after adding noise (0.35 cps bin −1 ) and emulating bias and imprecision errors in the location constraints (Table3).For each point, multiple simulations on randomly selected m/z axes were performed to estimate the standard deviation of the RMSE (blue shading).
Figure8.The imprecision in C 3 H + 7 fitted peak heights, σ h , estimated via the Monte Carlo approach described in the text.Although counting imprecisions have been omitted so as to illustrate the influence of the different approaches (a-e), Gaussian noise with standard deviation 0.35 cps bin −1 was added to each mass spectrum to allow comparison with Fig.7.The different approaches (a-c), detailed in the figure legend, illustrate the need to consider the position of the peak relative to the sampling grid ("bin-to-mode distance") when simulating peaks comprised of relatively few data points (this peak is illustrated in the upper-left panel of Fig.10).The approaches (d) and (e) illustrate the σ h that would be estimated in the absence of exact knowledge of the m/z-calibration bias.
Figure9.Normalized and centred probability distributions of the simulated imprecision in fits to well-resolved peaks from the test data set, using the µ-prediction biases and imprecisions given in Table3.Distributions were centred by subtracting the mean simulated error, so that only fitting imprecisions (relevant to PMF) are shown.Simulations were performed on randomly selected m/z axes from the data set.
Figure11.Example of the relationship between the uncertainty in the integrated area of for a single, well-resolved peak and its absolute area.The example uses real data for CO + 2 and shows two cases; first considering only counting uncertainties (red) and second considering both counting and peak-integration uncertainties (black), following Eq.(13).The upper panel shows the absolute imprecision; the lower panel the relative imprecision.The horizontal dotted line illustrates the more-realistic asymptotic behaviour of the new approach.
The dependence of the relative imprecision on the m/z calibration and mass-spectral resolution indicate www.atmos-meas-tech.net/8

Table 1 .
List of symbols and abbreviations.Symbols used only once in the text are omitted from this list.

Table 2 .
Effects of manually introducing errors to the PIKA analysis procedure.Cases highlighted in bold are plotted in Fig.3.Bracketed values are the estimated errors for the reference case.Added as the absolute value of Gaussian noise.cSkewedby multiplying the empirical peak-shape function with a normal cumulative distribution function, resulting in a 25 % smaller peak area (see Fig.3g and h).
a Added as Gaussian noise.b fitted h: bias, imprecision Overlapping-peak uncertainties estimated by the method outlined in this manuscript.Four model peaks are shown, defined with the same shape as observed in the test data set.Prior to fitting, counting noise was added to each data point and representative mass calibration errors (µ-prediction errors, see text) were added to each constrained peak location.The resulting imprecision in fitted peak height σ h was estimated by Monte Carlo with effective imprecision 20 ppm, as labelled for each peak.The respective peak-integration imprecisions due to ion counting are labelled as σ n .The ordinate units are counts bin −1 .