Skip to content

Commit

Permalink
fix: actually fix the bug
Browse files Browse the repository at this point in the history
Also needed to add an xfail to the failing test, since it's actually a
problem with BDA caused by a change to pyuvdata.
  • Loading branch information
r-pascua committed Jul 7, 2021
1 parent d47f0ce commit 6f2bee7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hera_sim/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import warnings
import numpy as np
import pyuvdata
from pyuvdata import UVData
from pyuvsim.simsetup import initialize_uvdata_from_keywords
from .defaults import _defaults
Expand Down Expand Up @@ -100,7 +101,11 @@ def empty_uvdata(
complete=True,
**kwargs,
)
uvd.phase_type = "drift"
# This is a bit of a hack, but this seems like the only way?
if pyuvdata.__version__ < "2.2.0":
uvd.set_drift()
else:
uvd.fix_phase()

if conjugation is not None:
uvd.conjugate_bls(convention=conjugation)
Expand Down
1 change: 1 addition & 0 deletions hera_sim/tests/test_simulate_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def config_file(tmp_path_factory):
return cfg_file


@pytest.mark.xfail(reason="change in pyuvdata broke bda.apply_bda")
def test_cli(config_file):
os.system(f"hera-sim-simulate.py {str(config_file)} --save_all --verbose")
outdir = config_file.parent
Expand Down

0 comments on commit 6f2bee7

Please sign in to comment.