How to remove outliers from a Raman spectrum

9 ビュー (過去 30 日間)
Gaska
Gaska 2020 年 1 月 2 日
コメント済み: Gaska 2020 年 1 月 10 日
I have a Raman spectrum looking like the one below and would like to remove the outliers from it. I tried to remove it using e.g. a function "rmoutliers" but it does not seem to work. How to do it?
Thanks a lot for the answer.
RamanSpectrum_MatlabFQ.png
  1 件のコメント
Gaska
Gaska 2020 年 1 月 2 日
For example, by using the function: rmoutliers I get this (blue: my spectrum; red: spectrum after rmoutliers function)
The code is:
X=lambda;
Y=intensity;
[B,TF] = rmoutliers(Y,'movmedian',X(200),'SamplePoints',X);
figure;
plot(X,Y,'b-',lambda(~TF),B,'r-');
legend('Input Data','Output Data');
RamanSpectrum_MatlabFQ_1.png

サインインしてコメントする。

採用された回答

Divya Gaddipati
Divya Gaddipati 2020 年 1 月 8 日
You can achieve this using the different methods.
1) Using Basic fitting:
  • Fit a curve using 'polyfit'.
  • Identify outliers that lie outside the tolerance values.
  • Replace the outliers with fitted values.
2) Curve Fitting Toolbox can also be used to remove outliers from your data,
3) You can also use the following MATLAB Central File Exchange submission,
Hope this helps!
  1 件のコメント
Gaska
Gaska 2020 年 1 月 10 日
Thans a lot for your help!
Best,
Paulina

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeParametric Spectral Estimation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by