Skip to content

Commit

Permalink
Merge pull request #10 from matteobachetti/use_rayleigh_stat
Browse files Browse the repository at this point in the history
Allow using Rayleigh statistics
  • Loading branch information
matteobachetti authored Jan 12, 2024
2 parents d5c61e6 + 577a36c commit 73b0ce0
Show file tree
Hide file tree
Showing 7 changed files with 215 additions and 101 deletions.
39 changes: 12 additions & 27 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,40 +27,25 @@ jobs:
python: 3.x
toxenv: codestyle

- name: Python 3.7 with minimal dependencies
- name: Python 3.9 with minimal dependencies
os: ubuntu-latest
python: 3.7
toxenv: py37-test
python: 3.9
toxenv: py39-test

- name: Python 3.8 with all optional dependencies and coverage checking
- name: Python 3.11 with all optional dependencies and coverage checking
os: ubuntu-latest
python: 3.8
toxenv: py38-test-alldeps-cov
python: 3.11
toxenv: py311-test-alldeps-cov

- name: macOS - Python 3.8 with all optional dependencies
- name: macOS - Python 3.11 with all optional dependencies
os: macos-latest
python: 3.8
toxenv: py38-test-alldeps
python: 3.11
toxenv: py311-test-alldeps

- name: Windows - Python 3.8 with all optional dependencies
- name: Windows - Python 3.11 with all optional dependencies
os: windows-latest
python: 3.8
toxenv: py38-test-alldeps

# - name: Python 3.7 with oldest supported version of all dependencies
# os: ubuntu-16.04
# python: 3.7
# toxenv: py37-test-oldestdeps

# - name: Python 3.8 with latest dev versions of key dependencies
# os: ubuntu-latest
# python: 3.8
# toxenv: py38-test-devdeps

# - name: Test building of Sphinx docs
# os: ubuntu-latest
# python: 3.x
# toxenv: build_docs
python: 3.11
toxenv: py311-test-alldeps

steps:
- name: Checkout code
Expand Down
18 changes: 13 additions & 5 deletions ell1fit/create_parfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ def update_model(model, value_dict):
value = mean * factor + initial
err = max(neg, pos) * factor
if par == "Phase":
new_model.TZRMJD.value = -value / new_model.F0.value / 86400 + PEPOCH
new_model.TZRMJD.uncertainty_value = err / new_model.F0.value / 86400
new_model.TZRMJD.frozen = False
# new_model.TZRMJD.value = PEPOCH
try:
new_model.TZRMJD.value = -value / new_model.F0.value / 86400 + PEPOCH
new_model.TZRMJD.uncertainty_value = err / new_model.F0.value / 86400
new_model.TZRMJD.frozen = False
# new_model.TZRMJD.value = PEPOCH
except ValueError:
pass
continue
if par == "PB":
value /= 86400
Expand All @@ -56,7 +59,12 @@ def update_model(model, value_dict):
getattr(new_model, par).uncertainty_value = err
getattr(new_model, par).frozen = False

logging.info(new_model.as_parfile())
try:
# This fails on windows
logging.info(new_model.as_parfile())
except Exception as e:
print(e)
pass
return new_model


Expand Down
Loading

0 comments on commit 73b0ce0

Please sign in to comment.