Generate MC photons from a two-sided distribution.
Helper function. This should work as is if w1,w2,loc are vectors.
n (int) – total number of photons
w1 (float or array-like) – scale parameter for func, lefthand peak
w2 (float or array-like) – scale parameter for func, righthand peak
loc (float or array-like) – position of peak
func (callable) – an ‘rvs’ function from scipy