BGlib.be.analysis.utils.be_loop.generate_guess

BGlib.be.analysis.utils.be_loop.generate_guess(vdc, pr_vec, show_plots=False)[source]

Given a single unfolded loop and centroid return the intial guess for the fitting. We generate most of the guesses by looking at the loop centroid and looking at the nearest intersection points with the loop, which is a polygon.

Parameters:
  • vdc (1D numpy array) – DC offsets

  • pr_vec (1D numpy array) – Piezoresponse or unfolded loop

  • show_plots (Boolean (Optional. Default = False)) – Whether or not the plot the convex hull, centroid, intersection points

Returns:

init_guess_coef_vec – Fit guess coefficient vector

Return type:

1D Numpy array