Skip to content

peak_position_and_average_1D

esta.general.peak_position_and_average_1D

get_location_peak_and_average(y, x, eps=None)

NOTE: it is finding of LOCATION OF PEAK AND AVERAGE !!!

  • finding index of peak position of a 1D function
  • finding index of average of 1D function not taking into account the function values below epsilon (epsilon = 1e-2 or other values)

input: array, x: xvariable array, y: function 1D; y variable float, eps: cutoff below which all values of y array are neglected

output: float, peak location or max of the function float, average position or average of 1D function