From e311b47727fb4c2ce55701be08c5aa9303c97f0a Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Tue, 20 Dec 2016 15:00:02 +0100 Subject: [PATCH] math module started --- src/math/__init__.py | 0 src/math/slope.py | 15 +++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 src/math/__init__.py create mode 100644 src/math/slope.py diff --git a/src/math/__init__.py b/src/math/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/math/slope.py b/src/math/slope.py new file mode 100644 index 0000000..3cc4c28 --- /dev/null +++ b/src/math/slope.py @@ -0,0 +1,15 @@ +''' +Created on Dec 20, 2016 + +@author: klaehn +''' + +import numpy as np + +def calc_slope(x, y, x_dist): + """ + Calculate the slope of a curve given by x and y arrays. The x_distance + gives the start and end point for the slope. + Returns x and y arrays of the slope + """ + return