pint.templates.lcprimitives.two_comp_mc

pint.templates.lcprimitives.two_comp_mc(n, w1, w2, loc, func)[source]

Generate MC photons from a two-sided distribution.

Helper function. This should work as is if w1,w2,loc are vectors.

Parameters:
  • 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