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 Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by