# Custom field calculation with standards after samples in sample set

Hello,

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?

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?

0

## Comments

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

(EQ(Label,"S1"))*(U1.%.(Area)/S1.%.(CCalRef1[Area]))+(EQ(Label,"S2"))*(U2.%.(Area)/S2.%.(CCalRef1[Area]))+(EQ(Label,"S3"))*(U3.%.(Area)/S3.%.(CCalRef1[Area]))+(EQ(Label,"S4"))*(U4.%.(Area)/S4.%.(CCalRef1[Area]))+(EQ(Label,"S5"))*(U5.%.(Area)/S5.%.(CCalRef1[Area]))

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.

My sample set is as follows:

Con1 U1

Con2 U2

Con3 U3

Con4 U4

Con5 U5

Resolution

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.

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.

Con1

Dil1

Con2

Dil2

Because mine is

Con1

Con2

Dil1

Dil2

Do you want to send me an email at [email protected]? your attached document? and if you can to send me the backuped up project

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:

Hello,

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?