필터 지우기
필터 지우기

Peak analysis of spectrum

조회 수: 8 (최근 30일)
Nathan Kennedy
Nathan Kennedy 2017년 4월 5일
댓글: Star Strider 2017년 4월 6일
Hi, I have an emission spectrum of experimental data (attached graph). I have overlaid one emission line which should match a peak from the spectrum. I have many emission lines to add.
Is there a method on MATLAB for finding a peak that is in a defined proximity of an overlaid emission line and once found, calculate the wavelength width of this peak.
Thanks

답변 (2개)

Star Strider
Star Strider 2017년 4월 5일
Consider using the Signal Processing Toolbox findpeaks function to locate the peak amplitudes and frequencies.
  댓글 수: 2
Nathan Kennedy
Nathan Kennedy 2017년 4월 6일
Hi, I have used this but I need to insert a section of code that will be another filter for selection of peaks. The extra selection should look at whether the peak is within a specified wavelength range of one of the emission vertical lines.
spectrumdata =csvread('spectrum8bin.csv');
wavelength = spectrumdata(:, 1);
SFD = spectrumdata(:, 2);
[pks,locs,widths,proms] = findpeaks(SFD,wavelength,'Threshold',2,'MinPeakProminence',4)
[psor,lsor] = findpeaks(SFD,wavelength,'SortStr','descend','Threshold',2,'MinPeakProminence',4)
findpeaks(SFD,wavelength,'Threshold',2,'MinPeakProminence',4,'Annotate','extents')
text(lsor+.02,psor,num2str((1:numel(psor))'))
widths
For example, some of the vertical lines are at the following wavelengths
SVI1 = vline(937.06,'r','S-VI');
Lygamma2= vline(972.54,'r','Lygamma');
Star Strider
Star Strider 2017년 4월 6일
If you have the ‘specified wavelengths’ as a vector, subtract the frequency (locations) vector returned by findpeaks from the reference vector to calculate the deviation (or preferably absolute deviation) and then use some threshold to determine if the deviations are appropriate. The vectors should be the same size. (Otherwise, you can use the bsxfun function with the @minus function, but that will necessarily be more difficult.)
I’m not certain what you want to do from your description, so that’s my best guess as to how to approach it.

댓글을 달려면 로그인하십시오.


Nathan Kennedy
Nathan Kennedy 2017년 4월 6일
Hi, I have used this but I need to insert a section of code that will be another filter for selection of peaks. The extra selection should look at whether the peak is within a specified wavelength range of one of the emission vertical lines.
spectrumdata =csvread('spectrum8bin.csv');
wavelength = spectrumdata(:, 1);
SFD = spectrumdata(:, 2);
[pks,locs,widths,proms] = findpeaks(SFD,wavelength,'Threshold',2,'MinPeakProminence',4)
[psor,lsor] = findpeaks(SFD,wavelength,'SortStr','descend','Threshold',2,'MinPeakProminence',4)
findpeaks(SFD,wavelength,'Threshold',2,'MinPeakProminence',4,'Annotate','extents')
text(lsor+.02,psor,num2str((1:numel(psor))'))
widths
For example, some of the vertical lines are at the following wavelengths
SVI1 = vline(937.06,'r','S-VI');
Lygamma2= vline(972.54,'r','Lygamma');

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by