wavelength_one=target[60].wavelength.value
flux_one=target[60].flux.value
wavelength_two=target[61].wavelength.value
flux_two=target[61].flux.value
f,ax=plt.subplots(figsize=(15,10))
ax.plot(wavelength_one,flux_one,color='green')
ax.plot(wavelength_two,flux_two,color='black')
ax.grid(True)
I have the following code that plots two spectrum with wavelength as the x-axis and flux as the y-axis. I want to find the first point of intersection between these graphs. How would I be able to find the index for the flux value where they intersect for the first time? The flux values are in a numpy array. I want to find the index of the first overlapping flux value and the corresponding wavelength associated with the intersection.