Why does my Inter-channel Custom Field Calculation not auto-populate?
I have collected three data channels (different wavelengths) and want to calculate the Channel.0.0 / Channel.0.1 ratio and the Channel.0.0 / Channel.0.2 ratio. I have written a custom fields that calculate the values correctly.
PkHtRatio1 = ..%"0"(Height)/..%"1"(Height)
PkHtRatio2 = ..%"0"(Height)/..%"2"(Height)
When I batch process to generate a Result Set from a Sample Set containing a Summarize Custom Field command, the calculations are performed correctly, but the results are populated oddly. The value for PkHtRatio1 is only populated into the Result for Channel.0.2 and the value for PkHtRatio2 is only populated into the Result for Channel.0.1. The behavior seems to be that the calculation doesn't store a result in any channel that is part of the calculation.
If I open the Result Set up and hit the Quantitate button (without doing anything else), any empty fields will be populated with the correct value.
I am assuming I am doing something wrong with how I am processing my data, but I can't figure it out. Does anyone have any suggestions?
PkHtRatio1 = ..%"0"(Height)/..%"1"(Height)
PkHtRatio2 = ..%"0"(Height)/..%"2"(Height)
When I batch process to generate a Result Set from a Sample Set containing a Summarize Custom Field command, the calculations are performed correctly, but the results are populated oddly. The value for PkHtRatio1 is only populated into the Result for Channel.0.2 and the value for PkHtRatio2 is only populated into the Result for Channel.0.1. The behavior seems to be that the calculation doesn't store a result in any channel that is part of the calculation.
If I open the Result Set up and hit the Quantitate button (without doing anything else), any empty fields will be populated with the correct value.
I am assuming I am doing something wrong with how I am processing my data, but I can't figure it out. Does anyone have any suggestions?
0
Comments
-
Your syntax seems to be off for the formula. Try to include the label and injection portion of the formulas and double check the search order of result set only and sample/peak type is set to All. I would write it as:
%.%."Channel 1"(Height)/%.%."Channel 2"(Height) and the same for the second custom field. This will calculate the height of peak from all labelled injections and in Channel 1 by the same peak in Channel 2. Tick All or Nothing and this should display the result in Channel 2 for the 1st equatipn and Channel 3 for the 2nd equation.
Or you could edit the label to suit your needs so for example U% or S%. Are the channels derived in your method set with unique processing methods corresponding to each channel? Is the peak name the exact same in each processing method?
You also dont need Summarize Custom Fields in the sample set unless you are using AVE MIN MAX SUM or PROD.0 -
Thank you for the suggestions. For clarification, a single processing method is used for all three channels (so peaks names are identical) and there are no derived channels used. You were right about the summarize custom fields command, it is not needed. I had tired including it when I ran out of other ideas.
I tried the formulation you suggest and ran into the problem that the syntax rules interpret this as requiring that the calculation look for the most recent result. Thinking just about the PkHtRatio1 (Ch0/Ch1), that means that the values populated in first injection of the result set with "Peak A" will be empty for channel 0 and 1, but displayed in channel 2. The second result with "Peak A" present will use the result from the first injection, until they get replaced with new values.Ch0 Ch1 Ch2 Ht PkHtRatio Ht PkHtRatio Ht PkHtRatio Inj 1 1 --- 3 --- 5 0.333 Inj 2 7 0.333 9 2.333 11 0.778
Per the syntax rules, the formula should contain no label in order to drive the calculation to only look at the current sample line of the result set and not carry over prior peak height values.
However, the same behavior as before is still present. If I open the result up and hit the 'quantitate' button without doing anything else, the value in the custom field updates to the correct value. It is as if for each result the custom field is calculated and *then* the peak heights for the current result are determined.0 -
Could be 2 things going on judging by the result set quantitate behavior. Try naming your CF alphabetically greater than the field you are evaluating so I or greater (I being the next letter after Height) eg Inter_Channel_Ratio. This way, Height is calculated and then the CF follows.
Second, i cant get if you are looking to ratio peak in Ch0 injection 1 by peak in Ch1/2 of injection 2 or i presume you need 2 results per injection- Ch0/Ch1 and Ch0/Ch2 for injection 1 and same for injection 2. If so, specify the injection but not the label. So .%."Ch0"(Height)/.%."Ch1"(Height) and that should populate result in Ch1 for the previous equation and Ch2 for the 2nd equation. And it will do this over multiple injections of each line.
If its just a display issue why dont you just create a peak table in a report method for the 2 custom fields and filter to only display at Ch2 Data Filtering Condition of Channel Name= Ch2?0 -
Thanks for the ideas. I am sorry I wasn't clear about the calc I am aiming for. I have one injection and am collecting 3 wavelengths. I want to only make comparisons between wavelengths for a single injection. I had already tried the formula:
.%."Ch0"(Height)/.%."Ch1"(Height)
and it gave me the exact same results and behavior as
.."Ch0"(Height)/.."Ch1"(Height)
for my specific data set. In both cases, the calculated values are correct, they are just not populated into the Result for either Ch0 or Ch1 without manually triggering the quantitate function.
I tried renaming the CF to put it at the front of the line alphabetically. I had forgotten about that trick, but it did not make a difference in this instance.
You are correct that this is essentially a data display problem. I can work around it with a report, but I was concerned that this was really an issue of having incorrectly constructed the CF.
It is surprising to me, but this is starting to seem like something that Empower just can't do.0 -
In that case it may be the processing method thats the issue. I only worked with derived channels in the method set and that always displayed the correct result in the correct channel whenever i made cfs similar to yours. You have 3 channels to 1 processing method. Can you derive the 3 channels in your method set and give them basic names like Ch0 Ch1 and Ch2? For each channel assign a unique processing method. You dont have to make 3 new ones. For Ch0 use the current PM. For Ch1 just save your current PM with a small naming difference like _1 and same for Ch2 use _2. Save method set and process sample set using that method set. This should derive all your channels and cfs during processing and populate the correct results in the correct channels.
Its also possible you may have to nail down the exact syntax. So for example:
U1.1."Ch0"(Height)/U1.1."Ch1"(Height) then
U1.2."Ch0"(Height)/U1.2."Ch2"(Height)
And this should populate result in correct channel but obviously you are limited to that label U1. If you want multiple samples then put SAME instead of U1 and you are free to use whatever labels you want.
If that doesnt work a report method may be a better alternative. Its calculating it right but just displaying the result in an undesirable channel...
0 -
Also maybe leave out the injection of the syntax but leave the label.
%.."Ch0"(Height)/%.."Ch1"(Height)
That may force the cf to populate in the correct channel per injection.0