フィルターのクリア

How to correct background to extract fine features of a signal containing multiple gaussian envelopes?

1 回表示 (過去 30 日間)
I am trying to extract fine features and plot them from a signal that consists of two distinct gaussian envelopes. I used the background correction code below https://www.mathworks.com/matlabcentral/fileexchange/27429-background-correction
Apparently, the code works only for signals with one gaussian envelope (I may be wrong?); but i could not get the desired result. I cannot simply apply gaussian filtering because it will modify the linewidths of the fine features, which are of key importance in this singal.
Any help to resolve this issue would be highly appreciated. I have attached a .mat file to give folks an idea about how the vectors look like.

採用された回答

Image Analyst
Image Analyst 2023 年 3 月 3 日
What is this? What generated the signal? It already looks like a baseline-corrected signal. I'm not sure you'd want to do anything to that signal.
s = load('ct8.mat')
s = struct with fields:
x1: [1340×1 double] y1: [1340×1 double]
x = s.x1;
y = s.y1;
plot(x, y, 'b-');
grid on;
figure;
s = load('ct8.mat');
x = s.x1;
y = s.y1;
subplot(2, 1, 1);
plot(x, y, 'b-');
grid on;
smoothy = sgolayfilt(y, 2, 151);
hold on;
plot(x, smoothy, 'r-', 'LineWidth', 2)
subplot(2, 1, 2);
yDiff = y - smoothy;
plot(x, yDiff, 'b-');
grid on;
If you were to subtract out the baseline, where would you put it? Can you attach a picture of the baseline drawn in red underneath the signal? By the way, I'm attaching some demos for you to adapt.
Or maybe you could use sgolayfilt to get a smoothed version of the signal and then subtract it.
  3 件のコメント
Image Analyst
Image Analyst 2023 年 3 月 3 日
I have other baseline correction methods. If I get time this weekend I can try them on your data. I don't have time today, probably.
ct8
ct8 2023 年 3 月 3 日
Great no rush and thanks for the help!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Signal Processing Toolbox についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by