Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix-for-pyuvdat2.4 #266

Merged
merged 12 commits into from
Aug 17, 2023
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Changelog
=========

dev
===

Fixed
-----
- API calls for pyuvdata v2.4.0.

v4.1.0 [2023.06.26]
===================
This release heavily focuses on performance of the visibility simulators, and in
Expand Down
2 changes: 1 addition & 1 deletion hera_sim/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def empty_uvdata(
# This is a bit of a hack, but this seems like the only way?
if pyuvdata.__version__ < "2.2.0":
uvd.set_drift()
else:
elif next(iter(uvd.phase_center_catalog.values()))["cat_type"] != "unprojected":
uvd.fix_phase()

# TODO: the following is a hack patch for pyuvsim which should be fixed there.
Expand Down
9 changes: 6 additions & 3 deletions hera_sim/sigchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,12 +1086,15 @@ def build_coupling_matrix(
else:
power_beam = uvbeam.copy()
power_beam.efield_to_power()
if power_beam.interpolation_function is None:
power_beam.interpolation_function = pixel_interp
# if power_beam.interpolation_function is None:
# power_beam.interpolation_function = pixel_interp
steven-murray marked this conversation as resolved.
Show resolved Hide resolved
if power_beam.freq_interp_kind is None:
power_beam.freq_interp_kind = freq_interp
power_beam = power_beam.interp(
freq_array=freqs * units.GHz.to("Hz"), new_object=True
freq_array=freqs * units.GHz.to("Hz"),
new_object=True,
interpolation_function=pixel_interp,
# freq_interp_func=freq_interp,
steven-murray marked this conversation as resolved.
Show resolved Hide resolved
) # Interpolate to the desired frequencies
power_beam.to_healpix()
power_beam.peak_normalize()
Expand Down
2 changes: 2 additions & 0 deletions hera_sim/visibilities/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ def run_vis_sim(args):
lst_range=None,
polarizations=None,
blt_inds=None,
phase_center_ids=None,
catalog_names=None,
)[0]

np.save(args.compress, blt_inds)
Expand Down
Loading