EstimatedBackground[data]
estimates the background of data.
EstimatedBackground[data,σ]
tries to preserve peaks up to scale σ.
EstimatedBackground
EstimatedBackground[data]
estimates the background of data.
EstimatedBackground[data,σ]
tries to preserve peaks up to scale σ.
Details and Options
- EstimatedBackground estimates the background or baseline while trying to preserve features of the input list.
- Input data can be of one of the following forms:
-
{y1,y2,…} a list of values TimeSeries[…] time series object EventSeries[…] event series object - The following options can be given:
-
Method Automatic method to use Padding "Reversed" padding scheme to use - EstimatedBackground accepts a Method option. Possible settings are:
-
"MovingAverage" moving-average background estimation {"SNIP",r} statistics-sensitive nonlinear iterative peak clipping
Examples
open all close allBasic Examples (2)
Estimate the baseline of a list:
data = {2, 1, 3, 5, 6, 6, 4, 3, 2, 4, 7, 3, 2, 4, 2, 2, 1};base = EstimatedBackground[data]ListLinePlot[{data, base}]Remove the baseline from original data and visually compare the lists:
ListLinePlot[{data, data - base}]Estimate background of a sinusoidal signal:
data = Table[Sin[i] + .1Sin[10 i], {i, 0, 2Pi, 0.01}];
ListLinePlot[{data, EstimatedBackground[data]}]Scope (4)
The background is scale dependent; by default, an automatically computed scale is used:
data = FinancialData["GE", {"Jun 2010", "Jan 2011"}, "Value"];ListLinePlot[{data, EstimatedBackground[data]}]At scale
the background is a close estimation of the input data:
ListLinePlot[{data, EstimatedBackground[data, 0]}]ListLinePlot[{data, EstimatedBackground[data, 10]}]Comparison of different scales:
list = Range[5, 20, 5];
ListLinePlot[Prepend[EstimatedBackground[data, #]& /@ list, data], PlotLegends -> Prepend["σ = " <> ToString[#]& /@ list, "Original"], Filling -> Table[i -> {i + 1}, {i, 1, Length[list]}]]Estimate baseline of a Quantity object:
data = WeatherData["New York", "Temperature", {"2010", "2012", "Month"}, "Value"]EstimatedBackground[data]Estimate baseline of a regularly sampled TimeSeries object:
ts = TimeSeries[FinancialData["MSFT", "Jan. 1, 2008"], TemporalRegularity -> True]base = EstimatedBackground[ts]DateListPlot[{ts, EstimatedBackground[ts]}]Estimated baseline of an irregularly sampled TimeSeries object:
v = {2, 1, 6, 5, 7, 4};
t = {1, 2, 5, 10, 12, 15};
ts = TimeSeries[v, {t}]RegularlySampledQ[ts]EstimatedBackground[ts]DateListPlot[{ts, %}]Options (1)
Applications (2)
Estimate and subtract the background from the recent sunspot activity:
data = WolframAlpha["sunspot", {{"SunspotsPartialTimeSeries:SpaceWeatherData", 1}, "TimeSeriesData"}][[All, 2]];bg = EstimatedBackground[data];ListLinePlot[{data, bg}, AspectRatio -> 1 / 3]Plot data after background subtraction:
ListLinePlot[data - bg, AspectRatio -> 1 / 3]Hourly temperature for Chicago in December:
temp = WeatherData["Chicago", "Temperature", {{2014, 12, 1, 0, 0}, {2014, 12, 31, 23, 59}, All}]DateListPlot[temp]The plot indicates that data contains missing values. Specify MissingDataMethod and estimate the background:
res = EstimatedBackground[data = TimeSeries[temp, MissingDataMethod -> {"Interpolation", InterpolationOrder -> 1}]]DateListPlot[{data, res}]Create the time series of the original data minus the background:
diff = TimeSeriesThread[Subtract[#[[1]], #[[2]]]&, {data, res}]DateListPlot[diff]Fit a weakly stationary time series model:
model = TimeSeriesModelFit[TimeSeriesResample[diff]]model["Process"]Properties & Relations (1)
The "MovingAverage" computes the MovingAverage of the padded input:
data = Table[Sin[i] + .1Sin[10 i], {i, 0, 2Pi, 0.01}];
r = 10;bg1 = EstimatedBackground[data, r, Method -> "MovingAverage"];
bg2 = MovingAverage[ArrayPad[data, r, "Reversed"], 2r + 1];bg1 == bg2See Also
Related Guides
History
Text
Wolfram Research (2014), EstimatedBackground, Wolfram Language function, https://reference.wolfram.com/language/ref/EstimatedBackground.html.
CMS
Wolfram Language. 2014. "EstimatedBackground." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/EstimatedBackground.html.
APA
Wolfram Language. (2014). EstimatedBackground. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EstimatedBackground.html
BibTeX
@misc{reference.wolfram_2026_estimatedbackground, author="Wolfram Research", title="{EstimatedBackground}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/EstimatedBackground.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_estimatedbackground, organization={Wolfram Research}, title={EstimatedBackground}, year={2014}, url={https://reference.wolfram.com/language/ref/EstimatedBackground.html}, note=[Accessed: 13-June-2026]}