@sidneymau reported a bug where very low flux objects being drawn with chromatic photon shooting could error rather than just not draw anything.
The bug stemmed from having both 0 photons and each photon having a flux of 0 (the g parameter returned by calculate_nphotons). This is overkill and confused one of the calculations in the chromatic draw function. In case there are other bits of code that similarly assume the raw flux is sensible even if nphotons=0, I changed the calculate_nphotons function to return g=1 when iN=0.
@sidneymau reported a bug where very low flux objects being drawn with chromatic photon shooting could error rather than just not draw anything.
The bug stemmed from having both 0 photons and each photon having a flux of 0 (the g parameter returned by calculate_nphotons). This is overkill and confused one of the calculations in the chromatic draw function. In case there are other bits of code that similarly assume the raw flux is sensible even if nphotons=0, I changed the calculate_nphotons function to return g=1 when iN=0.