How can I write a code in OpenLab CDS that gives me the peak area of a specific compound that appears in my chromatogram?

As I asked, how can I write a code for obtaining the peak area of a identified compound in my sample? As I show in the figure, the Ri is the area of an individual peak (I suppose that the code for this is Peak_Area, but please let me know), the mst and ERRF are constants that I already have imported from a file, the mp is the mass of the sample (code: Sample_Amount, please let me know again if is correct) and Rst is the peak area of a specific peak (the code that I don't know).

If yoiu could help me I would be extremely grateful.

Parents
  • Hello,

    I will assume you are doing this calculation inside a single injection. If so, the example below should be useful. In that example, I am calculating the ratio between 2 peaks (Peak A/ Peak B) at the injection scope. 

    Marty

    CurrentInjection.AllPeaksAndGroupsByName("Peak A").Select(function(x) x.Peak_Area).First / CurrentInjection.AllPeaksAndGroupsByName("Peak B").Select(function(x) x.Peak_Area).First

Reply
  • Hello,

    I will assume you are doing this calculation inside a single injection. If so, the example below should be useful. In that example, I am calculating the ratio between 2 peaks (Peak A/ Peak B) at the injection scope. 

    Marty

    CurrentInjection.AllPeaksAndGroupsByName("Peak A").Select(function(x) x.Peak_Area).First / CurrentInjection.AllPeaksAndGroupsByName("Peak B").Select(function(x) x.Peak_Area).First

Children
Was this helpful?