From 8726f31301d1c216c190b8c225ebb4ccaa941038 Mon Sep 17 00:00:00 2001 From: Mike Jarvis Date: Wed, 17 May 2023 08:28:11 -0400 Subject: [PATCH] Fix another place where photon_ops could be None or [] --- galsim/chromatic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galsim/chromatic.py b/galsim/chromatic.py index 3b0253591af..4bc242c9c59 100644 --- a/galsim/chromatic.py +++ b/galsim/chromatic.py @@ -444,7 +444,7 @@ def drawImage(self, bandpass, image=None, integrator='quadratic', **kwargs): # If there are photon ops, they'll probably need valid wavelengths, so add # WavelengthSampler as the first op in the list. - if 'photon_ops' in kwargs: + if kwargs.get('photon_ops', None): wave_sampler = WavelengthSampler(self.SED, bandpass) kwargs['photon_ops'] = [wave_sampler] + kwargs['photon_ops']