diff --git a/python/adjoint/objective.py b/python/adjoint/objective.py index e50076a26..616353aae 100644 --- a/python/adjoint/objective.py +++ b/python/adjoint/objective.py @@ -216,7 +216,7 @@ def place_adjoint_source(self, dJ): center=self.volume.center, **self.eigenmode_kwargs, ) - else isinstance(self.mode,mp.DiffractedPlanewave): + elif isinstance(self.mode,mp.DiffractedPlanewave): source = mp.EigenModeSource( src, eig_band=new_dp,