custom calculation

I need your help.
Is it possible to have in the same formula a specific calculation for each compound for example:
If peak 1 compound amount *5/sample weight
If peak 2 compound amount *10*/sample weight

Thank you for your help


  • Hi!

    Will it be a general CC, or the same factors will be used all the time. If you want to set up them in every sampleset, you shuld create a compound custom field first, and the CC reads the values from it. If it's fixed, then use this simple way:

    Compound_Concentration*iif(compound_name="peak 1",5,10)/Sample_Amount


  • It seems to me that this formula only works for 2 peaks.
    I have chosen my example wrong because I would like for a number greater than 2, for example :
    If pic1 then compound amount *5/ sample amount,
    if peak 2 then compound amount *5
    if peak 3 then compound amount * 10
    thank you


  • Ok, so you have two options:

    Create a CompoundCustomParameter (from CP / Project / CDS settings/Compound Custom Parameter) for the Factors (default value is should be 1), then fill the values in the sequence in every Sample lines

    Modify the CC to this:

    Compound_Concentration* CurrentPeakOrGroup.GetCustomField("Factor")/Sample_Amount

    The second option is create a constant file, upload it to the project, read the factors from the file with a CC. ( I've never tried this before :) )

    File sould be something like this:

    Compound  Factor

    Peak1            5

    Peak2            5

    ...                    ...

    Compound_Concentration* GetConstant("Factor")/Sample_Amount

    Slight smile

  • The way to determine the method to use is how often you will need to change the factors. If the factors will be changed frequently, then I would use compound custom parameters in the project. If the factors never change or change infrequently, then use the constants file in the CC.

    Marty Adams

  • Thank you for your quick response;
    I have never used a constant file before, I will think about it...;
    Thank you

  • What about using the compound multipliers in the Calibration part of the processing method with a "mass%" type calibration?


Was this helpful?