projects
/
calibcant.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c045476
)
Work around x_contact == x[0] in limited_linear_param_guess.
author
W. Trevor King
<wking@tremily.us>
Thu, 2 Aug 2012 16:00:26 +0000
(12:00 -0400)
committer
W. Trevor King
<wking@tremily.us>
Thu, 2 Aug 2012 16:00:26 +0000
(12:00 -0400)
calibcant/bump_analyze.py
patch
|
blob
|
history
diff --git
a/calibcant/bump_analyze.py
b/calibcant/bump_analyze.py
index 7601cadb91b97692170c0d94f9bef5dbf1e61076..d5e0f9cc8bbe6ca7160d4eddfd7f05f3b75a3438 100644
(file)
--- a/
calibcant/bump_analyze.py
+++ b/
calibcant/bump_analyze.py
@@
-234,6
+234,8
@@
def limited_linear_param_guess(x, y):
x_high = float(x[i_high])
if x_high == x_contact: # things must be pretty flat
x_contact = (x_contact + x[0]) / 2
+ if x_high == x_contact:
+ x_high = x[1]
slope = (y_high - y_contact) / (x_high - x_contact)
return (x_contact, y_contact, slope)