Skip to content

Commit f0e6107

Browse files
bhazeltonjpober
authored andcommitted
Fix a bug when setting pixel_coordinate_system in to_uvbeam
1 parent a7dcd39 commit f0e6107

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ use pooch to download and cache the test data in testing and in tutorials.
1313
- Added pooch as a testing dependency, added a new optional dependency option
1414
called `tutorial` which currently adds pooch and matplotlib.
1515

16+
### Fixed
17+
- A bug that caused an error when setting the pixel_coordinate_system in
18+
`UVBeam.new` and `AnalyticBeam.to_uvbeam`.
19+
1620
## [3.2.3] - 2025-07-21
1721

1822
### Added

src/pyuvdata/uvbeam/initializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def new_uvbeam(
246246

247247
if pixel_coordinate_system is not None:
248248
allowed_pcs = list(uvb.coordinate_system_dict.keys())
249-
if uvb.pixel_coordinate_system not in allowed_pcs:
249+
if pixel_coordinate_system not in allowed_pcs:
250250
raise ValueError(
251251
f"pixel_coordinate_system must be one of {allowed_pcs}"
252252
)

tests/test_beam_interface.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def test_beam_interface(
125125
to_uvbeam_kwargs = {"axis1_array": az_array, "axis2_array": za_array}
126126

127127
include_cross_pols = kwargs.get("include_cross_pols", True)
128+
to_uvbeam_kwargs["pixel_coordinate_system"] = coord_sys
128129

129130
uvb = analytic.to_uvbeam(
130131
beam_type=init_beam_type, freq_array=freq_array, **to_uvbeam_kwargs

0 commit comments

Comments
 (0)