Skip to content

Commit

Permalink
Merge branch 'main' into enu_from_ecef_api_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adeliegorce authored Jul 12, 2024
2 parents 8e66d77 + cd12a55 commit 5aa0b74
Show file tree
Hide file tree
Showing 7 changed files with 195 additions and 145 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.xml
directory: ./coverage/reports/
Expand Down
13 changes: 10 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ build:
tools:
python: "3.11"

python:
install:
- method: pip
path: .
extra_requirements:
- docs

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
Expand All @@ -28,6 +35,6 @@ sphinx:
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
# python:
# install:
# - requirements: docs/requirements.txt
3 changes: 0 additions & 3 deletions docs/requirements.txt

This file was deleted.

3 changes: 2 additions & 1 deletion hera_pspec/pstokes.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ def _combine_pol(uvd1, uvd2, pol1, pol2, pstokes='pI', x_orientation=None):
uvdS.data_array = stdata # pseudo-stokes data
uvdS.flag_array = flag # flag array
uvdS.polarization_array = np.array([pstokes], dtype=int) # polarization number
uvdS.nsample_array = uvd1.nsample_array + uvd2.nsample_array # nsamples
# nsamples combined to preserve proper variance, see hera_pspec issue #391
uvdS.nsample_array = 4 * (uvd1.nsample_array**-1 + uvd2.nsample_array**-1)**-1

uvdS.history = "Merged into pseudo-stokes vis with hera_pspec version {}\n{}" \
"{}{}{}{}\n".format(__version__, "-"*20+'\n',
Expand Down
308 changes: 173 additions & 135 deletions hera_pspec/tests/test_utils.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hera_pspec/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ def uvd_to_Tsys(uvd, beam, Tsys_outfile=None):
if pol.upper() in STOKPOLS:
pol = 'pI'
pind = pols.index(pol)
uvd.data_array[tinds, :, pind] *= J2K[pol]
uvd.data_array[tinds, ..., pind] *= J2K[pol]

if Tsys_outfile is not None:
uvd.write_uvh5(Tsys_outfile, clobber=True)
Expand Down
9 changes: 7 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ platforms = OSX,Linux
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers =
Development Status :: 5 - Production/Stable
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Intended Audience :: Science/Research
License :: OSI Approved
Natural Language :: English
Expand Down Expand Up @@ -54,12 +56,15 @@ exclude =

[options.extras_require]
docs =
sphinx>=1.8
sphinx==5.3.0
sphinx_rtd_theme==1.1.1
readthedocs-sphinx-search==0.1.1
nbsphinx
ipython
sphinx_autorun
numpydoc>=0.8
nbsphinx
mock==1.0.1
tests =
coverage>=4.5.1
pytest>=3.5.1
Expand Down

0 comments on commit 5aa0b74

Please sign in to comment.