Josh pointed out in #1229 that chromatic objects with wavelength-dependent transformations don't work with photon shooting. This fixes that.
I also fixed two other issues in this part of the code:
GalSim automatically adds a WavelengthSampler to the photon_ops for photon shooting chromatic objects. But if the user already did that, then it (1) redundantly samples the wavelengths twice, which is inefficient and (2) warns the user that this is likely an error. Well, IMO, the error is in the GalSim code, not the user code. So now it skips adding a redundant WavelengthSampler and consequently doesn't emit the warning.
I realized when writing the test that the handling of the poisson_flux option in ChromaticConvolution was incorrect. It neglected to apply the g factor returned by _calculate_nphotons, which is required to get the rendered poisson flux correct. (Basically because the way we implement this, shooting always tries to get the right total flux with whatever n_photons is, but then multiplying by g gets them back to the poisson value.)
Josh pointed out in #1229 that chromatic objects with wavelength-dependent transformations don't work with photon shooting. This fixes that.
I also fixed two other issues in this part of the code:
_calculate_nphotons
, which is required to get the rendered poisson flux correct. (Basically because the way we implement this, shooting always tries to get the right total flux with whatever n_photons is, but then multiplying by g gets them back to the poisson value.)