atsim.potentials._tablereaders

Module Contents

Classes

TableReaderBase(fileobj, inputConvert=None, outputConvert=None) Abstract base class for linearly interpolated base classes, classes inheriting
DatReader(fileobj, inputConvert=None, outputConvert=None) Class that reads space separated data from a text file providing linearly interpolated
class atsim.potentials._tablereaders.TableReaderBase(fileobj, inputConvert=None, outputConvert=None)[source]

Bases: list

Abstract base class for linearly interpolated base classes, classes inheriting from TableReaderBase must implement _populate method that accepts a file object and populates self (TableReaderBase inherits from list), with ordered (x,y) tuples

getValue(self, x)[source]

Returns y value for given x value, using linear interpolation if x lies between data-points. If x is out of the range described by this object then returns 0.0

@param x x-value for which y value should be calculated @return y value for given x-position

class atsim.potentials._tablereaders.DatReader(fileobj, inputConvert=None, outputConvert=None)[source]

Bases: atsim.potentials._tablereaders.TableReaderBase

Class that reads space separated data from a text file providing linearly interpolated value lookups through getValue() method