Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
svigeland committed Jun 7, 2024
2 parents c7a817d + d91baf2 commit 0acd813
Show file tree
Hide file tree
Showing 15 changed files with 312 additions and 231 deletions.
41 changes: 25 additions & 16 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@
max-line-length = 120
max-complexity = 45
ignore =
E203
E225 # missing whitespace around operator
E226 # missing whitespace around arithmetic operator
W503 # line break before binary operator; conflicts with black
W504 # Don't want to change with code frozen...
E722 # bare except ok
E731 # lambda expressions ok
E266 # block comments
E741 # ambiguous variable names
E501 # lines
E203,
# missing whitespace around operator
E225,
# missing whitespace around arithmetic operator
E226,
# line break before binary operator; conflicts with black
W503,
# Don't want to change with code frozen...
W504,
# bare except ok
E722,
# lambda expressions ok
E731,
# block comments
E266,
# ambiguous variable names
E741,
# lines
E501
exclude =
.git
.tox
__pycache__
build
dist
docs/*
.git,
.tox,
__pycache__,
build,
dist,
docs/*,
.enterprise_extensions/*
20 changes: 10 additions & 10 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, '3.10']

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install non-python dependencies on mac
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Test with pytest
run: make test
- name: Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
#with:
# fail_ci_if_error: true

Expand All @@ -65,11 +65,11 @@ jobs:
if: github.event_name == 'release'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.10"
- name: Install non-python dependencies on linux
run: |
sudo apt-get install libsuitesparse-dev
Expand Down Expand Up @@ -111,11 +111,11 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check
3. The pull request should work for Python 3.7, 3.8, 3.9, and 3.10, and for PyPy. Check
https://travis-ci.org/stevertaylor/enterprise_extensions/pull_requests
and make sure that the tests pass for all supported Python versions.

Expand Down
12 changes: 11 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
=======
History
=======

2.4.3 (2023-27-06)
Update Zenodo entry.

2.4.2 (2022-28-12)
Fix HyperModel to support newer versions of numpy.

2.4.1 (2022-02-10)
Add support for new noise definitions in WidebandTimingModel.

2.4.0 (2022-02-10)
Use Timing Package (Tempo,Tempo2,Pint) definition of EQUAD. Enterprise has
broken backwards compatibility, and here we use the `tnequad` flag to switch on
Expand All @@ -19,7 +29,7 @@ Fix bug in HyperModel when using save_runtime_info.
Fix bugs associated with recent function additions. Added linting and mild PEP8
rules. Also removed older Python functionality which is no longer supported.

2.3.0 (2021-09-15)*
2.3.0 (2021-09-15)
Functionality added for NANOGrav 15yr dataset analyses.
Outlier analysis software moved into separate package.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ You can also install it by cloning the repo and running `pip install .` in the `
Did you use `enterprise_extensions`?
Remember to cite it as:

>Taylor, S. R., Baker, P. T., Hazboun, J. S., Simon, J., & Vigeland, S. J. (2021). enterprise_extensions v2.3.1. https://github.com/nanograv/enterprise_extensions
>Taylor, S. R., Baker, P. T., Hazboun, J. S., Simon, J., & Vigeland, S. J. (2021). enterprise_extensions v2.4.3. https://github.com/nanograv/enterprise_extensions
```latex
@misc{enterprise,
author = {Stephen R. Taylor and Paul T. Baker and Jeffrey S. Hazboun and Joseph Simon and Sarah J. Vigeland},
title = {enterprise_extensions},
year = {2021},
url = {https://github.com/nanograv/enterprise_extensions},
note = {v2.3.3}
note = {v2.4.3}
}
```

Expand Down
2 changes: 1 addition & 1 deletion enterprise_extensions/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.4.0"
__version__ = "2.4.3"
12 changes: 7 additions & 5 deletions enterprise_extensions/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def channelized_backends(backend_flags):


def white_noise_block(vary=False, inc_ecorr=False, gp_ecorr=False,
efac1=False, select='backend', tnequad=False, name=None):
efac1=False, select='backend', tnequad=False, name=None, ng_twg_setup=False, wb_efac_sigma=0.25):
"""
Returns the white noise block of the model:
Expand Down Expand Up @@ -74,6 +74,8 @@ def white_noise_block(vary=False, inc_ecorr=False, gp_ecorr=False,
if vary:
if efac1:
efac = parameter.Normal(1.0, 0.1)
elif ng_twg_setup:
efac = parameter.Normal(1.0, wb_efac_sigma)
else:
efac = parameter.Uniform(0.01, 10.0)
equad = parameter.Uniform(-8.5, -5)
Expand Down Expand Up @@ -772,23 +774,23 @@ def common_red_noise_block(psd='powerlaw', prior='log-uniform',
cpl = gpp.free_spectrum(log10_rho=log10_rho_gw)

if orf is None:
crn = gp_signals.FourierBasisGP(cpl, coefficients=coefficients,
crn = gp_signals.FourierBasisGP(cpl, coefficients=coefficients, combine=combine,
components=components, Tspan=Tspan,
name=name, pshift=pshift, pseed=pseed)
elif orf in orfs.keys():
if orf == 'crn':
crn = gp_signals.FourierBasisGP(cpl, coefficients=coefficients,
crn = gp_signals.FourierBasisGP(cpl, coefficients=coefficients, combine=combine,
components=components, Tspan=Tspan,
name=name, pshift=pshift, pseed=pseed)
else:
crn = gp_signals.FourierBasisCommonGP(cpl, orfs[orf],
components=components,
components=components, combine=combine,
Tspan=Tspan,
name=name, pshift=pshift,
pseed=pseed)
elif isinstance(orf, types.FunctionType):
crn = gp_signals.FourierBasisCommonGP(cpl, orf,
components=components,
components=components, combine=combine,
Tspan=Tspan,
name=name, pshift=pshift,
pseed=pseed)
Expand Down
1 change: 1 addition & 0 deletions enterprise_extensions/empirical_distr.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ def make_empirical_distributions(pta, paramlist, params, chain,

if len(pl) == 1:
idx = pta.param_names.index(pl[0])

prior_min = pta.params[idx].prior._defaults['pmin']
prior_max = pta.params[idx].prior._defaults['pmax']

Expand Down
Loading

0 comments on commit 0acd813

Please sign in to comment.