openpathsampling.numerics.LookupFunction

class openpathsampling.numerics.LookupFunction(ordinate, abscissa)[source]

Interpolation between datapoints.

Parameters:
  • ordinate (iterable of numbers) – values for the ordinate

  • abscissa (iterable of numbers) – values for the abscissa

  • number. (Iteration and numpy ufuncs work on the values. Callable with any)

Notes

Largely, this class mimics an immutable dictionary, except instead of implementing __getitem__, we use the __call__ function. If you call a number that is in the dictionary, you get exactly that number. If you call a number that it not in the dictionary, the get the linear interpolation/extrapolation for that number based on the dictionary values.

__init__(ordinate, abscissa)[source]

Methods

__init__(ordinate, abscissa)

from_dict(dct)

keys()

Return the (ordered) list of ordinates

series()

Return a pandas.Series representation of data points

values()

Return the list of values (ordered by ordinate)

Attributes

x

Property to return the ordinates