Message Boards Message Boards

0
|
7583 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Calculate the background of the annexed spectrum with EstimatedBackground?

Posted 7 years ago
Attachments:
POSTED BY: Sandra Fernandes
4 Replies
Posted 7 years ago

Hello Sandra,

data = Import[
   "<your path>\\Plot_W3234-3240.csv"];

EstimatedBackground does not support data in the form {{xi,yi}...}, but can handle TimeSeries

ts = TimeSeries[data];

Off[InterpolatingFunction::dmval]

ListPlot[{ts, EstimatedBackground[ts], ts - EstimatedBackground[ts]}, 
 PlotRange -> All, ImageSize -> Large, Joined -> True]

ListPlot[{ts, EstimatedBackground[ts], ts - EstimatedBackground[ts]}, 
 PlotRange -> {{0, 20}, Automatic} , ImageSize -> Large, 
 Joined -> True, 
 PlotLegends -> {"data", "background", "corrected data"}]
POSTED BY: Michael Helmle
POSTED BY: Sandra Fernandes
Posted 7 years ago
ts2 = TimeSeriesResample[ts];
peaks = FindPeaks[ts2, 0.5, 0.1, 120];
peaks["Path"] // TableForm
ListPlot[ts2, 
 Epilog -> {Orange, PointSize[0.03], Point[peaks["Path"]]}, 
 PlotRange -> All]

You have to play with the parameters of FindPeaks

POSTED BY: Michael Helmle
POSTED BY: Sandra Fernandes
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract