I am trying to build a peak finder to find all peaks with their height and peak area from data from a voltammetric experiments ( Current vs potential).
I already figured out how to find all the maxima and minima values using a recursive loop. Now my problem is that I want to find the area of the peaks. That means that i want to find all the values before and after the maximum that are above backround value and then add them all up for integration.
My idea is to split the data into two tables and then compare one row with the next in order to see if the data decreases. The point where the data does not decrease anymore will then be the end point of the peak.
I have some ideas on how to do all of this (althought they might be far to complicated) but I am currently failing at splitting the data.
The easiest would be to split it by the row ID (one table with all the data before the row id of the maximum and one data with all the data below this row id) but I did not really find a way to do this.
Do you have any ideas on how I can do this?
Also if you have better ideas for me to find my peaks and define their are, let me know.
Thank you for your help.