Skip to content

match_funct_1d_transmatch_funct_1d_transMatchFunct1dTransMatchFunct1dTransmatch_funct_1d_transT_match_funct_1d_trans🔗

Short description🔗

match_funct_1d_transmatch_funct_1d_transMatchFunct1dTransMatchFunct1dTransmatch_funct_1d_transT_match_funct_1d_trans — Calculate transformation parameters between two functions.

Signature🔗

match_funct_1d_trans( function_1d Function1, function_1d Function2, string Border, number ParamsConst, string UseParams, out number Params, out number ChiSquare, out number Covar )match_funct_1d_trans( : : Function1, Function2, Border, ParamsConst, UseParams : Params, ChiSquare, Covar )void MatchFunct1dTrans( const HTuple& Function1, const HTuple& Function2, const HTuple& Border, const HTuple& ParamsConst, const HTuple& UseParams, HTuple* Params, HTuple* ChiSquare, HTuple* Covar )static void HOperatorSet.MatchFunct1dTrans( HTuple function1, HTuple function2, HTuple border, HTuple paramsConst, HTuple useParams, out HTuple paramsVal, out HTuple chiSquare, out HTuple covar )def match_funct_1d_trans( function_1: Sequence[Union[float, int]], function_2: Sequence[Union[float, int]], border: str, params_const: Sequence[float], use_params: Sequence[str] ) -> Tuple[Sequence[float], float, Sequence[float]]

Herror T_match_funct_1d_trans( const Htuple Function1, const Htuple Function2, const Htuple Border, const Htuple ParamsConst, const Htuple UseParams, Htuple* Params, Htuple* ChiSquare, Htuple* Covar )

HTuple HFunction1D::MatchFunct1dTrans( const HFunction1D& Function2, const HString& Border, const HTuple& ParamsConst, const HTuple& UseParams, double* ChiSquare, HTuple* Covar ) const

HTuple HFunction1D::MatchFunct1dTrans( const HFunction1D& Function2, const char* Border, const HTuple& ParamsConst, const HTuple& UseParams, double* ChiSquare, HTuple* Covar ) const

HTuple HFunction1D::MatchFunct1dTrans( const HFunction1D& Function2, const wchar_t* Border, const HTuple& ParamsConst, const HTuple& UseParams, double* ChiSquare, HTuple* Covar ) const (Windows only)

HTuple HFunction1D.MatchFunct1dTrans( HFunction1D function2, string border, HTuple paramsConst, HTuple useParams, out double chiSquare, out HTuple covar )

Description🔗

match_funct_1d_transMatchFunct1dTrans calculates the transformation parameters between two functions given as the tuples Function1function1function_1 and Function2function2function_2 (see create_funct_1d_arrayCreateFunct1dArray and create_funct_1d_pairsCreateFunct1dPairs). The following model is used for the transformation between the two functions:

\[\begin{eqnarray*} y_{1}(x) = a_{1} y_{2}(a_{3} x + a_{4}) + a_{2} \enspace . \end{eqnarray*}\]

The transformation parameters are determined by a least-squares minimization of the following function:

\[\begin{eqnarray*} \sum_{i=0}^{n-1} {\bigr( y_{1}(x_{i}) - a_{1} y_{2}(a_{3} x_{i} + a_{4}) + a_{2} \bigl)}^2 \enspace . \end{eqnarray*}\]

The values of the function \(y_{2}\) are obtained by linear interpolation. The parameter Borderborderborder determines the values of the function Function2function2function_2 outside of its domain. For Borderborderborder='zero'"zero" these values are set to 0, for Borderborderborder='constant'"constant" they are set to the corresponding value at the border, for Borderborderborder='mirror'"mirror" they are mirrored at the border, and for Borderborderborder='cyclic'"cyclic" they are continued cyclically. The calculated transformation parameters are returned as a 4-tuple \([a_{1}, a_{2}, a_{3}, a_{4}]\) in ParamsparamsValparams. If some of the parameter values are known, the respective parameters can be excluded from the least-squares adjustment by setting the corresponding value in the tuple UseParamsuseParamsuse_params to the value 'false'"false". In this case, the tuple ParamsConstparamsConstparams_const must contain the known value of the respective parameter. If a parameter is used for the adjustment (UseParamsuseParamsuse_params = 'true'"true"), the corresponding parameter in ParamsConstparamsConstparams_const is ignored. On output, match_funct_1d_transMatchFunct1dTrans additionally returns the sum of the squared errors ChiSquarechiSquarechi_square of the resulting function, i.e., the function obtained by transforming the input function with the transformation parameters, as well as the covariance matrix Covarcovarcovar of the transformation parameters ParamsparamsValparams. These parameters can be used to decide whether a successful matching of the functions was possible.

Note that in case that there is no unique solution for the transformation parameters, match_funct_1d_transMatchFunct1dTrans either returns one selected single solution or returns the error 9205 (Matrix is singular).

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Function1function1function_1 (input_control) function_1d → (real / integer)(real / integer)HTuple (double / Hlong)HFunction1D, HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Function 1.

Function2function2function_2 (input_control) function_1d → (real / integer)(real / integer)HTuple (double / Hlong)HFunction1D, HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Function 2.

Borderborderborder (input_control) string → (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)

Border treatment for function 2.

Default: 'constant'"constant"
List of values: 'constant', 'cyclic', 'mirror', 'zero'"constant", "cyclic", "mirror", "zero"

ParamsConstparamsConstparams_const (input_control) number-array → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Values of the parameters to remain constant.

Number of elements: 4
Default: [1.0, 0.0, 1.0, 0.0][1.0, 0.0, 1.0, 0.0]

UseParamsuseParamsuse_params (input_control) string-array → (string)(string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Should a parameter be adapted for it?

Number of elements: 4
Default: ['true', 'true', 'true', 'true']["true", "true", "true", "true"]
List of values: 'false', 'true'"false", "true"

ParamsparamsValparams (output_control) number-array → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Transformation parameters between the functions.

Number of elements: 4

ChiSquarechiSquarechi_square (output_control) number → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Quadratic error of the output function.

Covarcovarcovar (output_control) number-array → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Covariance Matrix of the transformation parameters.

Number of elements: 16

Combinations with other operators🔗

Combinations

Possible predecessors

create_funct_1d_arrayCreateFunct1dArray, create_funct_1d_pairsCreateFunct1dPairs

See also

gray_projectionsGrayProjections

Module🔗

Foundation