aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/delta_calibrate.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-03-02 18:18:35 -0500
committerKevin O'Connor <kevin@koconnor.net>2018-03-04 09:56:50 -0500
commitfa07be93463d9ce0262ae383259e68eea625bc4d (patch)
treeec028add97cd891fe9ebd85b140c1219e062eaaa /klippy/extras/delta_calibrate.py
parent7290ed5f73f4c649099fec5b13cd7c3f7a29b2d2 (diff)
downloadkutter-fa07be93463d9ce0262ae383259e68eea625bc4d.tar.gz
kutter-fa07be93463d9ce0262ae383259e68eea625bc4d.tar.xz
kutter-fa07be93463d9ce0262ae383259e68eea625bc4d.zip
mathutil: Move coordinate_descent() to new file
Add a new python file (mathutil.py) and move the coordinate_descent() code to it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/delta_calibrate.py')
-rw-r--r--klippy/extras/delta_calibrate.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/extras/delta_calibrate.py b/klippy/extras/delta_calibrate.py
index b65a7815..57ae8f09 100644
--- a/klippy/extras/delta_calibrate.py
+++ b/klippy/extras/delta_calibrate.py
@@ -4,7 +4,7 @@
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import math, logging
-import probe, delta
+import probe, delta, mathutil
class DeltaCalibrate:
def __init__(self, config):
@@ -51,7 +51,7 @@ class DeltaCalibrate:
x, y, z = delta.get_position_from_stable(spos, params)
total_error += (z - self.probe_z_offset)**2
return total_error
- new_params = probe.coordinate_descent(
+ new_params = mathutil.coordinate_descent(
adj_params, params, delta_errorfunc)
logging.info("Calculated delta_calibrate parameters: %s", new_params)
for spos in positions: