In [1]:
import sys
sys.path.append('../')
sys.path.append('../../')
from errorpro.interactive import *
init(locals())

In [2]:
import errorpro
help(errorpro)


Help on package errorpro:

NAME
    errorpro - python script to calculate physical quantities from data including units and error propagation

DESCRIPTION
    You may use these functions to work on your data:
    core.py functions:
    - assign
    - formula
    - ...
    interactive.py functions:
    - init
    - load_file
    - save_to_csv
    - ...
    
    Get detailed description with 'help(my_function)'!

PACKAGE CONTENTS
    core
    csv
    dimensions (package)
    fitting
    interactive
    interpreter
    mean_value
    parsing (package)
    plotting_gnuplot
    plotting_matplotlib
    pytex
    quantities
    si
    units

FILE
    c:\users\lukas\anaconda3\lib\site-packages\errorpro\__init__.py



In [2]:
%%eq
{
Spannung U <0.1> [V], Geschwindigkeit v <10> [km/h]
    1   260
    1.5 355
    2   360
    2.5 410
    3   500
    3.5 480
    4   580
}

In [3]:
v0, U0 = params('v0 U0')
z = assign(0.1, unit="V", name="z")
a = assign(5, unit="km/h", name="a")
fit(v0*exp(U/U0) + a*sin(U/z), U, v, [v0, U0, z, a])


Out[3]:
Results of fit

$v_{0} \; \mathrm{\left[\frac{m}{s}\right]}$ $U_{0} \; \mathrm{\left[V\right]}$ $z \; \mathrm{\left[V\right]}$ $a \; \mathrm{\left[\frac{km}{h}\right]}$
$62 \pm 7$ $4.1 \pm 0.6$ $0.114 \pm 0.004$ $23 \pm 21$


In [9]:
plot(U,v, {'label':'Messpunkte', 'marker':'.'}, U, v0*exp(U/U0) + a*sin(U/z), {'color':'blue', 'label':'geiler Fit'}, legend=5, xrange=[0.5,4.5], xlabel='Spannung $U$ [V]', size=[8,5])


Out[9]:

In [ ]:
%%eq
x = 5 <0.1>
y = 3*x**2 -x

In [ ]:
plot(x,y**2-y)

In [ ]:
%%eq
a = 1 <0.1>
b = 1 <0.1>
c = 1 <0.1>
d = a/b+c/b

In [ ]:
z = assign(d+c)
z