Skip to content

Commit

Permalink
Merge pull request #21 from steven-murray/some-fixes
Browse files Browse the repository at this point in the history
fix: error in pyuvdata import
  • Loading branch information
steven-murray authored Jul 15, 2020
2 parents 955e352 + 306baeb commit 0e83ebd
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ py21cmsense\.egg-info/
*.pyc
docs/_build/
.ipynb_checkpoints/
pip-wheel-metadata/
.tox/
*.pkl
*.npz
*.png
2 changes: 1 addition & 1 deletion example_configs/observatory_hera.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
antpos:
function: hera # if antpos is a dict, it uses a function from antpos.py
hex_num: 7
l: 14
separation: 14
dl: 12.12
units: m
beam:
Expand Down
2 changes: 1 addition & 1 deletion py21cmsense/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from astropy import units as un
from astropy.coordinates import EarthLocation, SkyCoord
from astropy.time import Time
from pyuvdata import uvutils
from pyuvdata import utils as uvutils

from . import config

Expand Down
4 changes: 2 additions & 2 deletions py21cmsense/antpos.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from . import _utils as ut


def hera(hex_num, l, dl, units="m"):
def hera(hex_num, separation, dl, units="m"):
"""
Produce a simple regular hexagonal array.
Expand All @@ -37,7 +37,7 @@ def hera(hex_num, l, dl, units="m"):
-------
"""
separation = ut.apply_or_convert_unit(units)(l)
separation = ut.apply_or_convert_unit(units)(separation)
dl = ut.apply_or_convert_unit(units)(dl)

try:
Expand Down
2 changes: 1 addition & 1 deletion py21cmsense/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def calc_sense(
freq=sensitivity.observation.frequency,
)

np.savez(os.path.join(direc, fname), ks=sensitivity.k1d, **out)
np.savez(os.path.join(direc, fname), ks=sensitivity.k1d.value, **out)

if write_significance:
sig = sensitivity.calculate_significance(
Expand Down
2 changes: 1 addition & 1 deletion py21cmsense/sensitivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def plot_sense_2d(self, sense2d):
except ImportError:
raise ImportError("matplotlib is required to make plots...")

keys = list(sorted(sense2d.keys()))
keys = sorted(sense2d.keys())
x = np.array([v.value for v in keys])
x = (
np.repeat(x, len(self.observation.kparallel))
Expand Down

0 comments on commit 0e83ebd

Please sign in to comment.