I have a function and I have detected the peaks of this function. I took the half of the height of each peak, now I want to find the intersection point, on the left only, between the function and the line that passes by the half of the height of the peak.
Please, note that in the picture below, the line does not exactly pass by the halves of the peaks. Indeed, each peak has a particular value of mid-height and I need to find the intersection point on the left with this value.
my function values are:
data= [2.50075550e+01 2.68589513e+01 2.88928569e+01 3.05468408e+01
3.17558878e+01 3.28585597e+01 3.41860820e+01 3.56781188e+01
3.68868815e+01 3.72671655e+01 3.65050587e+01 3.47342596e+01
3.24647483e+01 3.02772213e+01 2.84592589e+01 2.68653782e+01
2.51627240e+01 2.33132310e+01 2.18235229e+01 ...]
and I am getting the half of the heights using find_peaks from SciPy
heights.append(signal.find_peaks(data, height=height)[1]['peak_heights'])
#Then calculating the half of each peak