Custom field calculation with standards after samples in sample set

edited March 2020 in Software Products
I have a question for a custom field calculation. I would like to calculate an impurity at concentrated solution . The formula is Area (impurity A) at concentrated/ Area( Main peak) at diluted (from the concentrated). The concentrated samples are injected before the diluted. How can i calculate this type of calculation?


  • If its just one concentrated and dilute sample, an intersample CF like U1.%.(Area)/S1.%.(CCalRef1[Area]) with the main peak used as CCalRef1 of processing method would work fine. But I suspect you run several concentrated samples, followed by the same number of dilutions? You have 2 options. Label all the concentrated as U1, U2, U3 etc and the diluted, which I presume are standards, as S1, S2, S3 etc so S1 is a dilution of U1, S2 of U2 etc. 

    1st option is a Peak, Real, Calculated CF, search order Result Set Only, Sample and Peak Type all. Formula, presuming 5 sets of samples:

    Second option a Peak, Enumerated CF, Search Order Result Set Only, Use as Field. Formula is ENUM(EQ(Label,"S1"),EQ(Label,"S2"),EQ(Label,"S3"),EQ(Label,"S4"),EQ(Label,"S5")) and the translations being the formulas above so for position 0 (corresponding to EQ(Label,"S1") put in U1.%.(Area)/S1.%.(CCalRef1[Area]) (fc) The (fc) is critical to return this value. Do the same with the other translations ie position 1 corresponds to EQ(Label,"S2") which requires U2.%.(Area)/S2.%.(CCalRef1[Area]) (fc). This totally depends on how many samples you typically run. All results for both CFs will only populate when you generate a result set from processing a sample set. 
  • Thank you very much.I have to try it. But just one question. Can you generally structure the custom field to calculate the injection without editing of custom field. For the reason here the custom field is for 5 sets of sample set. So if you want 6-7 etc you have to modify it. Is it true?
  • Actually does not work.
    My sample set is as follows:
    Con1 U1
    Con2 U2
    Con3 U3
    Con4 U4
    Con5 U5
    Dil1 S1
    Dil2 S2
    Dil3 S3
    Dil4 S4
    Dil5 S5

    I process as sample set to result set with the same processing method which includes as CCalRef1 the main peak of diluted.What goes wrong?
  • Im not sure why the first CF didn't work for you but I just tested a new one and it worked fine for me. Here is what you do:

    Create a Peak, Real, Calculated custom field, Sample and Peak Type = All. Search Order = Result Set Only. Leave the Missing Peak and All or Nothing unchanged.

    Formula: SAME..(Area)/CCalRef1[Area] and call the CF Conc_Dilute_Ratio

    Label each pair the same, so:

    Con1 Label = U1

    Con2 Label = U2

    Con3 Label = U3

    etc etc as many as you like, not limited

    Dil1 Label = U1

    Dil2 Label = U2

    Dil3 Label = U3

    etc as before

    when you process the run, you will see the results for this custom field in the result set. So the area of each peak in your Concentrated sample will be divided by the area of your main peak (set as CCalref1) in the corresponding Dilute sample, and this will work whether you are running 1 pair or 100 pairs.

  • Hello again, i do not know what happened. I cannot take results. I use the same processing method. Can you send me as attachment a zipped file from your project that you have used the custom field? And then i can send you mine if something continue goes wrong...
  • I cant send on zipped projects but i can show you how i coded the custom field and how i set up the sample set if that helps? It worked fine for me.
  • ok yes i would like. because it does not work on me 
  • The way I got this to work was to first label up all the Concentrated and Dilute Samples the same, so U1 for the first concentrated sample and U1 for the first diluted sample too, then U2 for the second concentrated sample and U2 for the second diluted sample, and so on. You might be getting issues if you calculate amount as well because that will be a problem with the samples and standards having the same label, is it possible to just run the samples and calculate the areas and not amounts?

    I go this to work by creating the CF below then set up my sample set as below too. When I processed the run, the result populated in the result set and I set my main peak as CCalref1 in processing method. This worked fine then when I processed a sample set to generate a result set.

  • Anyone know how to add a word doc or picture? cant see any options?
  • Hi, when you write the message there is a ribbon that you can attach file. Your sample set is with the below structure?


    Because mine is


    Do you want to send me an email at your attached document? and if you can to send me the backuped up project 
  • Hello, maybe something is misunderstanding. Actually,  i would like to calculate peak of concentrated (area known, unknown component, any peak) divided by the main peak of diluted sample (which the main peak included in concentrated sample also). Nothing else. Area (any peak of con)/ Area of main component at diluted, which the main component is in the concentrated solution also. Finally, in the sample set where is the summarize custom field in function? I do the same thing, and nothing is calculated.
  • I'm confused as to what you are looking for. Your first post said you only wanted the area of Impurity A at concentrated divided by Area Main Peak at Diluted. That's what my CF does. it labels the concentrated and dilute samples the same, drops the injection in the CF syntax so Empower will look to the previous sample (concentrated), takes the area of peaks in that sample, divides by the Main peak in dilute. I set the Main Peak as CCalRef1 in processing method, processed the run as I have it set up and it worked fine, you don't need summarize custom fields. Your previous post now said you want all areas, knowns and unknowns, in the concentrated included, This contradicts your first post:

    I have a question for a custom field calculation. I would like to calculate an impurity at concentrated solution . The formula is Area (impurity A) at concentrated/ Area( Main peak) at diluted (from the concentrated). The concentrated samples are injected before the diluted. How can I calculate this type of calculation?

  • Yes you are right. It was an example the impurity A. Yes i know that i am wrong in this sentence. Actually i would like any peak known and unknown at concentrated divides by main peak at diluted.Also, the sample set is firstly all concentrated and then all diluted after all concentrated solutions. Do you have any idea how i can do that?
  • Hi, did you see my screenshot of the sample set? That's how I set mine up and it worked fine for me. But that was working on the assumption that you wanted all the knowns in your concentrated divided by the main peak (CCalRef1) in the corresponding diluted sample. Did you create the CF and test it out as I suggested in the last few posts? As I said, it worked fine for me. I would say if you want this to include the unknown peaks as well, you need to select the Main Peak that's in CCalref1 as the "Default Peak" in the processing method. Tick that box, save and reprocess. Then any unknowns in the concentrated should be divided by the diluted sample.
  • Hi again, of course i read anything that you have mentioned and i did it as you exactly say. But I do not have result. I attached the project, me version of Empower 3 is FR4. If you restore it, can you see what goes wrong?
  • I cant unzip or restore projects. I think you shoud log a call with Waters about this if t doesn't work. Double check your custom field matches mine exactly, double check that the labels are the same for Conc and Dilute samples in the sample set, that the search order is Result Set Only and that the Main Peak is in CCalref1, plus that you process a sample set to get a result set. I did all of that and it worked perfectly for me.
  • Then when you process the sample set to result set, then in preview publisher you open any individual result. Is it right? Or you open the result set with a specific report method?
  • If you have done all that I suggested, when you process the sample set and open the result set, the result will be there as you go through each Dilute sample in the result set. Add the custom field to the Peaks view in the result set and you will see each result as you cycle through the Dilute Samples.

    You can choose to report on these results then in a report method with a peak table with that custom field in it.