Table Of Contents


Functions branch of the schema provides the list and description of different functions used for data presentation. These functions can be fit functions to calculate numerical data or functions to describe specific methods. The Functions element is defined by type FunctionsType and contains one or more Function elements.



Element Function of type FunctionType provides description of a function in terms of its value y, arguments x_1,x_2..., and additional parameters. Each function is identified by a functionID, that may be referred from Methods, FitData‘s FunctionParameters elements, Broadening‘s Lineshape. FunctionType is an extension of PrimaryType.

It is important to note that a fit function can be viewed just as a mathematical expression or as the representation of physical process. This second approach has been priviledged in XSAMS. Therefore, physical parameters, such as units or the reference frame for the energies are described in this section. Numerical data for the argument validity limits and the fit parameters are provided as fit data within the FitParametersType, wherever it is used in the schema.


Function element, extending PrimaryType, has the following elements and attributes:

  • mandatory functionID attribute of type FunctionIDType, that is the function identification to which any numerical data or method can refer. This attribute is mandatory, it may contain any alphanumeric characters and the first character of the identifier should be F

  • optional string Name element, which gives the name of the function;

  • mandatory Expression element, defined as a string with an additional attribute computerLanguage, providing the expression used to calculate the function value;

  • mandatory Y element of type ArgumentType, that describes the value of the function, providing its units and type;

  • mandatory Arguments element, defining the list of Argument elements, each of ArgumentType, defining the function arguments, their units, types and the default validity limits;

  • optional element Parameters, defining the list of Parameter elements, describing function parameters: their units and names;

  • optinal element ReferenceFrame, with possible values

    • CenterOfMass
    • LaboratoryFrame
    • TargetFrame

    that is used when function is used in FitData within Processes.Collisions;

  • optional string Description element, giving a description of the function;

  • optional string SourceCodeURL, giving a location from where the function source code can be downloaded.


ArgumentType is used in Function in Y and Arguments elements and in FitParametersType in Arguments.


Following attributes and elements are defined by ArgumentType:

  • mandatory string name attribute, defining the function argument name. Must be the same as defined in the Function‘s element Expression.
  • mandatory units attribute, of type UnitsType, defining the units of the argument,
  • optional string Description attribute, providing the free-form description of the argument,
  • optional LowerLimit element of type xs:double,
  • optional UpperLimit element of type xs:double.

When ArgumentType is used within Function, LowerLimit and UpperLimit of the argument become the default range values. If required, they may be overridden later by FitArgument elements within FitParametersType. Attribute units should be ignored or checked for consistency when handling FitArgument from FitParametersType.


The Parameter element, defined by ParameterType, provides the information about the function parameter.


Listed within Parameters element of Function, it defines following attributes and elements:

  • mandatory string name attribute, that should match the one defined in the Function‘s Expression,
  • mandatory units attribute, of type UnitsType,
  • optional string Description providing the free-form description of the parameter


Here is an example function branch instance, defining the function k(T)=a*{t/300}^b * e^{-g/t}, with temperature argument T and three parameters, a, b, g:

        <Function functionID="FKIDAKOOJI">
                <Comments>Kooij function</Comments>
                <Expression computerLanguage="Fortran">
                        a * (T/300.) ** b * EXP(-g/T)
                <Y name="k" units="cm3/s">
                        <Description>Rate coefficient vs temperature</Description>
                        <Argument name="T" units="K">
                        <Parameter name="a" units="cm3/s">
                                <Description>alpha multiplier</Description>
                        <Parameter name="b" units="unitless">
                                <Description>beta power</Description>
                        <Parameter name="g" units="K">
                                <Description>gamma exponent</Description>