Top

physpy module

PhysPy is a SymPy-based Python library for calculating error percentage for measured values.

Functions

def coef(

probability, n)

def const(

name, value)

Create a global variable that refers to a constant NamedValue.

def constant(

name, value)

Construct a constant NamedValue.

def each(

fn, lst)

def each_lazy(

fn, lst)

def get_symbol(

value)

def get_value(

value)

def mapvalue(

name, values, ierr)

def mapvalue_lazy(

name, values, ierr)

def val(

name, values, ierr)

Create a global variable that refers to a NamedValue.

def value(

name, value, ierr)

Construct a NamedValue from values list and instrument drift.

def values(

*args)

Classes

class DependentValue

A value that depends on other values.

Ancestors (in MRO)

Static methods

def __init__(

self, symbol, values)

Initialize self. See help(type(self)) for accurate signature.

def absolute_error(

self, probability)

Calculate the absolute error.

def apply(

self, fn)

Apply a function to the value.

Note: the passed function must operate with SymPy values, not any Python objects.

def approx(

self)

Calculate the average value.

def relative_error(

self, probability)

Calculate the relative error.

def show(

self, probability, unicode=False)

Show the average value and error percentage in readable format.

Instance variables

var symbol

var values

class NamedValue

Named measured value.

Ancestors (in MRO)

Static methods

def __init__(

self, name, values, ierr)

Initialize self. See help(type(self)) for accurate signature.

def absolute_error(

self, probability)

Calculate the absolute error.

def apply(

self, fn)

Apply a function to the value.

Note: the passed function must operate with SymPy values, not any Python objects.

def approx(

self)

Calculate the average value.

def random_error(

self, probability)

def relative_error(

self, probability)

Calculate the relative error.

def rmsd(

self)

Calculate root-mean-square deviation.

def show(

self, probability, unicode=False)

Show the average value and error percentage in readable format.

Instance variables

var ierr

var name

var symbol

var values

class Value

An abstract class that represents either measured or dependent value.

Note: PhysPy values override arithmetic operators (+, -, *, /, **) and abs function.

Ancestors (in MRO)

Static methods

def __init__(

self)

Initialize self. See help(type(self)) for accurate signature.

def absolute_error(

self, probability)

Calculate the absolute error.

def apply(

self, fn)

Apply a function to the value.

Note: the passed function must operate with SymPy values, not any Python objects.

def approx(

self)

Calculate the average value.

def relative_error(

self, probability)

Calculate the relative error.

def show(

self, probability, unicode=False)

Show the average value and error percentage in readable format.