Find full-width-half-max of signal amongst noise floor.

6 Ansichten (letzte 30 Tage)
Stanley
Stanley am 24 Jun. 2024
Bearbeitet: David Goodmanson am 27 Jun. 2024
Hello there,
I am new to Matlab and struggling to find the FWHM of this signal amongst the noise floor. My plan thus far has been to find the average noise floor level on the y-axis (-72) and use that averaged level as the base before calculating the FWHM, however, I dont quite know how to continue from there and my prelimnary use of findpeaks isn't working. Any tips?
  1 Kommentar
David Goodmanson
David Goodmanson am 25 Jun. 2024
Bearbeitet: David Goodmanson am 27 Jun. 2024
Hi Stanley, is the intensity here in a log scale of some kind, such as dB?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Karl
Karl am 24 Jun. 2024
One approach would be to subtract the average noise floor level from the intensity values. You could then estimate the signal FWHM as the interval between intensity values multipled by the number of (noise-subtracted) intensity values greater than half the maximum.
% Define example intensity values (a.u.) as function of wavelength (nm).
dx = 0.2;
x = [2770:dx:2830];
y1 = (zeros(size(x))-72)+normrnd(0,3,size(x))+30*normpdf(x,2785,0.3);
% Plot example intensity values.
figure
plot(x,y1)
xlabel('Wavelength (nm)')
ylabel('Intensity (a.u.)')
ylim([-220, -20])
% Estimate noise as mean intensity value far from signal.
noise = mean(y1(y1<2780|y1>2785))
noise = -71.1836
% Obtain intensity values after noise subtraction.
y2 = y1 - noise;
% Plot intensity values after noise subtraction.
figure
plot(x,y2)
xlabel('Wavelength (nm)')
ylabel('Intensity (a.u.)')
% Estimate signal half maximum.
hm = 0.5*max(y2)
hm = 22.1144
% Estimate signal full with at half maximum.
fwhm = dx*numel(y2(y2>hm))
fwhm = 0.6000

Community Treasure Hunt

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

Start Hunting!

Translated by