diff --git a/src/pyuvdata/beam_interface.py b/src/pyuvdata/beam_interface.py index a8e553447..c5595e915 100644 --- a/src/pyuvdata/beam_interface.py +++ b/src/pyuvdata/beam_interface.py @@ -142,7 +142,7 @@ def as_power_beam( if self.Npols > 1 and ( (include_cross_pols and self.Npols != 4) - or (not include_cross_pols and self.Npols != 4) + or (not include_cross_pols and self.Npols != 2) ): warnings.warn( "as_power_beam does not modify cross pols when the beam is" diff --git a/tests/test_beam_interface.py b/tests/test_beam_interface.py index 9847fb0ee..e8e73f140 100644 --- a/tests/test_beam_interface.py +++ b/tests/test_beam_interface.py @@ -287,7 +287,9 @@ def test_clone(airy): @pytest.mark.parametrize("uvbeam", [True, False], ids=["uvbeam", "analytic"]) @pytest.mark.parametrize("allow_mutation", [True, False], ids=["mutate", "nomutate"]) -@pytest.mark.parametrize("include_cross_pols", [True, False, None], ids=["incx", "nox"]) +@pytest.mark.parametrize( + "include_cross_pols", [True, False, None], ids=["incx", "nox", "xpolnone"] +) def test_as_power( uvbeam: bool, allow_mutation: bool, include_cross_pols: bool, gaussian, gaussian_uv ): @@ -316,6 +318,7 @@ def test_as_power_noop(airy): assert intf is intf2 with pytest.warns(UserWarning, match="as_power_beam does not modify cross pols"): + print(intf.Npols) intf2 = intf.as_power_beam(include_cross_pols=False) assert intf is intf2