If n_photons is explicitly set in ChromaticSum.drawImage when drawing with method='phot', then that many photons will be used for each summand, instead of that many photons being used amongst all summands. This can also happen if ChromaticConvolution includes a ChromaticSum as a convolutant even when n_photons is not explicitly specified. I think we may need some logic similar to galsim.Sum.shoot inside ChromaticSum to get this right.
Also, once photons have been drawn from each summand profile, I think it's always okay to pass them through subsequent photons ops together. I.e., there's no need to repeatedly call the same photon op for each summand, and in fact avoiding this may lead to some small speedup.
If
n_photons
is explicitly set inChromaticSum.drawImage
when drawing withmethod='phot'
, then that many photons will be used for each summand, instead of that many photons being used amongst all summands. This can also happen ifChromaticConvolution
includes aChromaticSum
as a convolutant even whenn_photons
is not explicitly specified. I think we may need some logic similar togalsim.Sum.shoot
insideChromaticSum
to get this right.Also, once photons have been drawn from each summand profile, I think it's always okay to pass them through subsequent photons ops together. I.e., there's no need to repeatedly call the same photon op for each summand, and in fact avoiding this may lead to some small speedup.
Code to reproduce: