From 67595c5307585d9a2280b6056c5c5399f1d61306 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 16 Aug 2010 12:00:43 -0400 Subject: [PATCH] Apply constant offset to contact region in 'polynomial flatten' to avoid discontinuity --- hooke/plugin/vclamp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hooke/plugin/vclamp.py b/hooke/plugin/vclamp.py index 1115cde..770a224 100644 --- a/hooke/plugin/vclamp.py +++ b/hooke/plugin/vclamp.py @@ -638,7 +638,9 @@ Name of the flattening information in the `.info` dictionary. 'degree':degree, 'polynomial values':poly_values, } - out = def_data - mask*scipy.polyval(poly_values, dist_data) + out = (def_data + - numpy.invert(mask)*scipy.polyval(poly_values[-1:], dist_data) + - mask*scipy.polyval(poly_values, dist_data)) self._set_column(hooke=hooke, params=params, column_name='output deflection column', values=out) -- 2.26.2