autowisp.evaluator module — AutoWISP documentation

# autowisp.evaluator module

## Class Inheritance Diagram

More convenient interface to estaver interpreters.

class autowisp.evaluator.Evaluator(*data)

  Bases: `Interpreter`

  Evaluator for expressions involving fields of numpy array or headers.

  __call__(*args, **kwargs)

    Evaluate the expression enabling error.

  __init__(*data)

    Get ready to evaluate expressions given data.

    Parameters:

      data ([dict-like]) – A mapping between variable names that will participate in the expressions to be evaluated and the value that should be used. In case of repeating keys, later entries overwrite earlier ones.

    Returns:

      None

class autowisp.evaluator.LightCurveEvaluator(lightcurve, lc_points_selection=None, **lc_substitutions)

  Bases: `Interpreter`

  Evaluator for expressions involving lightcurve datasets.

  __init__(lightcurve, lc_points_selection=None, **lc_substitutions)

    Get ready to evaluate expressions against the given light curve.

  property lc_points_selection

    Getter for the poins selection property.

  property lc_substitutions

    Substitutions to apply to resolve lightcurve datasets.

    These can be changed after creating the instance.

  update_substitutions(new_substitutions)

    Like update for dict but resets previously read datasets.

class autowisp.evaluator.LightCurveLookUp(key_prefix, evaluator)

  Bases: `object`

  Look up datasets under specific key prefix.

  __getattr__(key_suffix)

    Return the given attribute, reading dataset if needed.

  __init__(key_prefix, evaluator)

    Look up datasets with keys like <key_prefix>.<something>.