Group AnalysisFunctionParameterHelpers

group AnalysisFunctionParameterHelpers

Functions

string AFH_GetListOfAnalysisParamNames(string params)

Return a semicolon separated list of user parameters.

Parameters:

params – serialized parameters, usually just AnalysisFunction_V3.params

variable AFH_IsParameterPresent(string name, string params)

Check if the given analysis parameter is present.

Parameters:
Returns:

one if present, zero otherwise

string AFH_GetAnalysisParamType(string name, string params, variable typeCheck = defaultValue, string expectedType = defaultValue)

Return the type of the user parameter.

Parameters:
Returns:

one of AnalysisFunctionParameterTypes or an empty string

variable AFH_GetAnalysisParamNumerical(string name, string params, variable defValue = defaultValue)

Return a numerical user parameter.

Parameters:
  • name – parameter name

  • params – serialized parameters, usually just AnalysisFunction_V3.params

  • defValue – [optional, defaults to NaN] return this value if the parameter could not be found

string AFH_GetAnalysisParamTextual(string name, string params, string defValue = defaultValue, variable percentDecoded = defaultValue)

Return a textual user parameter.

Parameters:
  • name – parameter name

  • params – serialized parameters, usually just AnalysisFunction_V3.params

  • defValue – [optional, defaults to an empty string] return this value if the parameter could not be found

  • percentDecoded – [optional, defaults to true] if the return value should be percent decoded or not.

wave AFH_GetAnalysisParamWave(string name, string params, wave defValue = defaultValue)

Return a numerical wave user parameter.

Parameters:
  • name – parameter name

  • params – serialized parameters, usually just AnalysisFunction_V3.params

  • defValue – [optional, defaults to an invalid wave ref] return this value if the parameter could not be found

Returns:

wave reference to free numeric wave, or invalid wave ref in case the parameter could not be found.

wave AFH_GetAnalysisParamTextWave(string name, string params, WaveText defValue = defaultValue, variable percentDecoded = defaultValue)

Return a textual wave user parameter.

Parameters:
  • name – parameter name

  • params – serialized parameters, usually just AnalysisFunction_V3.params

  • defValue – [optional, defaults to an invalid wave ref] return this value if the parameter could not be found

  • percentDecoded – [optional, defaults to true] if the return value should be percent decoded or not.

Returns:

wave reference to free text wave, or invalid wave ref in case the parameter could not be found.

variable AFH_IsValidAnalysisParameter(string name)

Check if the given name is a valid user parameter name.

variable AFH_IsValidAnalysisParamType(string type)

Check if the given type is a valid user parameter type.

string AFH_GetAnalysisParameter(string name, string params, string expectedType = defaultValue)

Return an user parameter’s value as string.

Parameters:
string AFH_RemoveAnalysisParameter(string name, string params)

Delete the given user parameter name.

Parameters:
Returns:

serialized parameters with name removed