Detect peak maximum on a spectrum from the raw data

mejohn

New Member
Joined
Jun 23, 2018
Messages
31
Office Version
  1. 365
Platform
  1. Windows
Hello everyone!
I’m trying to detect a peak maximum from the raw data of a spectrum, but only if the peak rises and falls by a minimum amount.

The formula I currently have will detect this, but only on sharp peaks which rise and fall by the minimum amount between adjacent row values.
So, if B10-B9>=positive minimum value AND B11-B10<=negative minimum value, then the peak is detected.
But if the peak is shallow, then the difference between adjacent row values is smaller than the minimum, and the peak will not be detected.

Here’s the main formula on Column E
=IFERROR(IF(((B10-B9)/($A9-$A10))>0,IF(AND((B9-B8)/($A8-$A9)>0,(B10-B8>=0.0006),(B11-B10<=-0.0006)),"True",""),""),"")

Columns C and D are not used in the formula, they only inform if the difference between adjacent row values are positive (peak rise) or negative (peak fall). Column D shows this in 1's (rise) and 0's (fall).

I’d like to account for all the consecutive peak rises (positive values on Column C) after a peak fall (negative values on Column C), and determine if the difference between the start of the peak rise and it’s fall is >=0.0006
At the same time, account for all consecutive peak falls (negative values) after a peak rise, and determine if the difference between the start of the peak fall and the start of the next peak rise is <=-0.0006
If both of these conditions are met, then report "True", as a peak was detected.

I hope this makes sense. Thank you all in advance for your time!

1661962137610.png
 

Attachments

  • peak detection.png
    peak detection.png
    24.1 KB · Views: 21
Hi Peter,

You're right, the peak fall was -0.000599, not <=-0.000600, and therefore not a peak.

I've marked your last formula as the correct solution.

Thank you so much, not only for the solution, but for caring about this issue.

Regards,
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,224,756
Messages
6,180,778
Members
452,996
Latest member
nelsonsix66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top