Message Boards Message Boards

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

Calculate the background of the annexed spectrum with EstimatedBackground?

Posted 6 years ago

Hello, I would like to calculate the background of the annexed spectrum (csv format). I have imported the data and I have managed to put these data in a Table or in graphic form. But the EstimatedBackground[Data] doesn't seem to work. Your help would be very appreciated! Thank you! Sandra

Attachments:
POSTED BY: Sandra Fernandes
4 Replies
Posted 6 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

Thank you so much once more, Michael!

POSTED BY: Sandra Fernandes

Thank you so much Michael! It worked well :-) I would like to find peaks in this spectra, using the FindPeak command... peak=FindPeak[data], doesn't seem to work. Could you give me a hint about this? Does anyone know where can I find the algorithm for the EstimatedBackground or any other mathematica commands?

POSTED BY: Sandra Fernandes
Posted 6 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
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