Offset of data within the injection sequence [Reporting, OpenLab 2.5]

Hello,

I would like to implement a calculation in the Custom Calculation Editor that moves a value of another Custom Calculation up one row in the injection order. Example: a value from Injection 2 should be output in the row of Injection 1.

Is this possible in any way?

Thanks and best regards
coh

  • I do not believe this is possible. Custom calculations are meant to apply post-run calculations on your data but I do not think it is possible to use the data from one sample as the output for another.

  • Hello,

    Yes this is possible as long as the data is in the same results set. A simple example is below. This would take the peak area from the previous injection for the matching peak name and place it in a custom field. This would be done for all named peaks. The next example would take the peak area of the previous standard injection before the current injection. It would again do this for all named peaks. You could make this even more complex by creating other CCs as an index or reference to use in the CC for selecting another injections peak_area or other value.

    Marty Adams

    CurrentSequence.AllIdentifiedPeaks.Where(function(x) x.Injection.Sample.Sample_OrderNumber = CurrentSample.Sample_OrderNumber -1).Where(function(x) x.Compound_Name = CurrentPeakOrGroup.Compound_Name).Select(function(x) x.Peak_Area).Sum.

    CurrentSequence.AllIdentifiedPeaks.Where(function(x) x.Injection.Sample.Sample_Type = 1).Where(function(x) x.Injection.Sample.Sample_OrderNumber  < CurrentSample.Sample_OrderNumber).Where(function(x) x.Compound_Name = CurrentPeakOrGroup.Compound_Name).OrderBy(function(x) x.Injection.Sample.Sample_OrderNumber).Select(function(x) x.Peak_Area).Last

  • Hello Martin,

    Thank you for your quick reply. The Custom Calculation works really great and led us to the desired goal. Thanks a lot!

    Best regards
    coh

Was this helpful?