Customfield for calculate difference between 2 injections

Discussions about chromatography data systems, LIMS, controllers, computer issues and related topics.

15 posts Page 1 of 1

I need customfield to calculate the difference between to injection of a testsolution with two components per injection, according to:
Rt(injection1)-Rt(injection)/average of those*100%.

thanks in advance,
This is fairly easy to do if you use the label of the sample cleverly. If its only for one sample in the sample set, you can label the test solution as TS in the Label Column. Then create a Peak, Real custom field with search order Result Set Only and leave the default sample type and peak type to All.

For the formula, type in..

ABS((TS.1.(Retention Time)-TS.2.(Retention Time)))/TS.%..AVE(Retention Time).

Dont forget to add the function Summarize Custom Fields as the last line in the sample set, or else the custom field wont work. You need this because of the AVE function. When you process the sample set, you get a result for the Test Solution in the Result Set.
Thanks, I will try asap I will let you know if it's work


Take's a while to get thinks done.
But sofar it doesn't work, maybe because I forgot some to tell,
That each injection contains 2 components and from each component
I must calculate the difference.
Hello again. That formula should still have worked, it takes into account all the components in an injection. If I understand you correctly, you want the difference in retention time for the 2 components between injection 1 and injection 2, and then divide this value by the average retention time of the component(s) in both injections?

Or do you need the difference in retention time between Component 1 and Component 2 in the same injection and then divide this by average of the retention times of both components in that injection? Please clarify.
Thx again,

Yes indeed the formula works but the results is not what I expected.
But we want the difference in retention time for the 2 components between injection 1 and injection 2, and then divide this value by the average retention time of the component(s) in both injections
Yes, that's what the formula does. Maybe its not what you expected since you need to multiply this by 100? When I tested this, I was getting very small amounts and had to increase precision to see the result, for example 0.00000087102.
If you multiply the CF formula by 100 it will give you a % difference.

As it stands, the CF will return the difference in RT for each component between Inj 1 and 2 and divide by the average RT of that component over the 2 injections. Did you add Summarize Custom Fields to the end of the sample set?
No I get just great results 1646 and 23687 for the 1e injection, 1672 and 23959 for the 2e injection.
The numbers are slightly different where I expect same numbers over 2 injections.
Yes I did add summarize cf to the end of the sampleset(exactly at the end or just after the samples?)
A few things may be causing the difference in values for the 2 injections. Firstly, check that the result at injection 2 is the correct one. Compare it with a manual calculation or using Excel. Also check that you only have the label TS used ONCE in the sample set, and not repeated for any previous sample. If thats correct, you just need to eliminate the result at injection 1. The first part of the formula is an intersample CF which needs both sections of the argument to calculate correctly, so at Injection 1 of the sample, there is no value yet for Injection 2 so essentially the calculation at injection 1 is: retention time- ZERO/Average RT. At Injection 2, all arguments are present, so Empower calculates retention time injection 1- retention time injection 2/Average retention time over 2 injections. The average value will be correct for both lines as thats an intersample summary CF so is populated correctly at all relevant lines. Summarize Custom Fields needs to be the last line of the sample set and needs to be set to "Normal" in the Processing column of the sample set.

Edit the formula to tick the "All or Nothing" option- this option will only populate the correct result on Injection 2 of the result when processed. All arguments are present at Injection 2. If this doesnt work, you can add a Bool condition to the end of the formula so that the result will only populate at Injection 2 of the sample labelled as TS and a blank value for every other result. For this option make sure All or Nothing is ticked. Edit the formula to read:

(EQ(Label,"TS")&EQ(Injection,2))*ABS((TS.1.(Retention Time)-TS.2.(Retention Time)))/TS.%..AVE(Retention Time)+(NEQ(Label,"TS")|NEQ(Injection,2))*-1*50000

Finally, occasionally CFs dont work right as they need to be named in alphabetical order so the field you are looking to measure is called Retention Time so for the CF you created, make sure the name of it starts with a letter GREATER than R so for example you could call it Sample_RT_Diff or something like that, as long as it starts with a Capital S. Then reprocess your sample set and you should get the correct results.

I hope this helps.
The result is calculate right but the numbers are too small instead of 0.086 and 0.229

I have now 0.00086 and 0.00229.
I see *100 must be added(?)
Now the formula works fine.

Do you have formula(CF) for %RSD calculation of a repeatable injection same vial 3 injection.
I now use there in the report method a peak table and in the column of interest the %RSD is calculated of the height or area.
Forgot to say that regarding two channels per injection, so for each component the calculation.
Label your sample/standard with something distinctive, for example RSD, then create a peak, real calculated custom field, search order Result Set Only, tick yes to All or Nothing. All Sample and All Peak Types. Formula is:


Process your sample set to generate a result set. In the Result Set, for the 3 injections, the %RSD value for the components in each channel will display and for every other sample, the CF will be blank. But its probably easier to use a report method and filter criteria to achieve this.
oke thx.
15 posts Page 1 of 1

Who is online

In total there are 16 users online :: 0 registered, 0 hidden and 16 guests (based on users active over the past 5 minutes)
Most users ever online was 599 on Tue Sep 18, 2018 9:27 am

Users browsing this forum: No registered users and 16 guests

Latest Blog Posts from Separation Science

Separation Science offers free learning from the experts covering methods, applications, webinars, eSeminars, videos, tutorials for users of liquid chromatography, gas chromatography, mass spectrometry, sample preparation and related analytical techniques.

Subscribe to our eNewsletter with daily, weekly or monthly updates: Food, Environmental, (Bio)Pharmaceutical, Bioclinical, Liquid Chromatography, Gas Chromatography and Mass Spectrometry.

Liquid Chromatography

Gas Chromatography

Mass Spectrometry