Commit e04add2d authored by Michael Rudolf's avatar Michael Rudolf
Browse files

Fixed a bug that tried to fit VST tests containing non-finite data

parent 44181d5d
......@@ -396,9 +396,19 @@ def fitfric(x, a, b):
# %%=====================VELOCITY STEPPING ANALYSIS============================
def vst_analysis(data):
mu_app = data['shearstress']/data['normalstress'] # Apparent friction
logvel = np.log10(data['velocity'])
# Remove nonfinite values for fitting
onlyfinite = np.isfinite(mu_app)
mu_app = mu_app[onlyfinite]
logvel = logvel[onlyfinite]
onlyfinite = np.isfinite(logvel)
mu_app = mu_app[onlyfinite]
logvel = logvel[onlyfinite]
pfit, pcov = curve_fit(
perr = 2*np.sqrt(np.diag(pcov))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment