BGlib.be.analysis.utils.be_loop.calculate_loop_centroid

BGlib.be.analysis.utils.be_loop.calculate_loop_centroid(vdc, loop_vals)[source]

Calculates the centroid of a single given loop. Uses polyogonal centroid, see wiki article for details.

Parameters:
  • vdc (1D list or numpy array) – DC voltage steps

  • loop_vals (1D list or numpy array) – unfolded loop

Returns:

  • cent (tuple) – (x,y) coordinates of the centroid

  • area (float) – geometric area