I'm looking to convolve a Gaussian with an asymmetric Gaussian. My attempt at this is below.
import numpy as np
import matplotlib.pyplot as plt
x=np.linspace(0,5,500)
dx=x[1]-x[0]
# Gaussian
sigma1=0.1
peak1=1
gauss1=np.exp(-(x-peak1)**2/(2*sigma1**2))
# Asymmetric Gaussian
gauss2=0.5*np.exp(-(x-1.5)**2/(-0.2+x*0.4)**2)
# convolution
conv=np.convolve(gauss1,gauss2,mode='same')*dx
plt.plot(x,gauss1,label='Gaussian')
plt.plot(x,gauss2,label='Asymmetric Gaussian')
plt.plot(x,conv,label='Convolution')
plt.xlim(0,5)
plt.legend()
plt.show()
I don't understand why the resultant curve is positioned where it is. I would have thought it would have a peak at some x location between that of the two original curves?