Hello
I have a question
Haw can I calculate the average of peak area for alternating injections
Find maintenance, best practice, and troubleshooting articles.
Hello
I have a question
Haw can I calculate the average of peak area for alternating injections
Hello,
In order to assist you we will need the following:
Hello,
In order to assist you we will need the following:
I use openlab CDs
Hello,
Is there something in common between the injections that you want to average(sample name, vial position, label, ect.) Below is a CC example that averages peak areas for identified peaks for all injections in the same vial.
CurrentSequence.AllIdentifiedPeaks.Where(function (x) x.Compound_Name = CurrentPeakOrGroup.Compound_Name).Where(function (x) x.Injection.Sample.Sample_VialNumber = CurrentInjection.Sample.Sample_VialNumber).Select(function(x) x.Peak_Area).Average
Marty Adams
Hello,
This CC would average the current injection with the next by Sample_OrderNumber in the result set. This would be a more generic way to get the average.
CurrentSequence.AllIdentifiedPeaks.Where(function (x) x.Compound_Name = CurrentPeakOrGroup.Compound_Name).Where(function(x) x.Injection.Sample.Sample_OrderNumber = CurrentSample.Sample_OrderNumber Or x.Injection.Sample.Sample_OrderNumber = (CurrentSample.Sample_OrderNumber +1)).Select(function(x) x.Peak_Area).Average