ewoksfluo.math.expression.expression_variables#

ewoksfluo.math.expression.expression_variables(expression, get_data, start_var='<', end_var='>')[source]#

Return the variables and associated expression to be evaluated.

Parameters:
  • expression (str) – for example “<name A> * <name B>”

  • get_data (Callable[[str], Tuple[str, Any]]) – takes a variable name as input and returns its full name and value

  • start_var (str) – marks the start of a variable name

  • end_var (str) – marks the end of a variable name

Return type:

Tuple[str, Dict[str, Any], Dict[str, str]]

Returns:

expression, variables and name map. For example expression “data0 * data1”, variables {“data0”:…, “data1”:…} and name map {“data0”:”name A”, “data1”:”name B”}.