-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into bayesian-wip
- Loading branch information
Showing
257 changed files
with
9,659 additions
and
3,895 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project, at least loosely, adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
This file contains the unreleased changes to the codebase. See CHANGELOG.md for | ||
the released changes. | ||
|
||
## Unreleased | ||
### Changed | ||
- Third-order Roemer delay terms to ELL1 model | ||
- Made the addition of a TZR TOA (`AbsPhase`) in the `TimingModel` explicit in `Residuals` class. | ||
- Updated `CONTRIBUTING.rst` with the latest information. | ||
- Made `TimingModel.params` and `TimingModel.ordered_params` identical. Deprecated `TimingModel.ordered_params`. | ||
### Added | ||
- Third-order Roemer delay terms to ELL1 model | ||
- Options to add a TZR TOA (`AbsPhase`) during the creation of a `TimingModel` using `ModelBuilder.__call__`, `get_model`, and `get_model_and_toas` | ||
- `pint.print_info()` function for bug reporting | ||
- Added an autocorrelation function to check for chain convergence in `event_optimize` | ||
### Fixed | ||
- Deleting JUMP1 from flag tables will not prevent fitting | ||
- Simulating TOAs from tim file when PLANET_SHAPIRO is true now works | ||
- Docstrings for `get_toas()` and `get_model_and_toas()` | ||
- Set `DelayComponent_list` and `NoiseComponent_list` to empty list if such components are absent | ||
- Fix invalid access of `PLANET_SHAPIRO` in models without `Astrometry` | ||
### Removed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,11 +20,14 @@ Report bugs at https://github.com/nanograv/pint/issues. | |
|
||
If you are reporting a bug, please include: | ||
|
||
* Your operating system name and version. | ||
* The output of ``pint.__version__`` and ``pint.__file__`` | ||
* The output of ``pint.print_info()``. This command provides the version information of | ||
the OS, Python, PINT, and the various dependencies along with other information about | ||
your system. | ||
* Any details about your local setup that might be helpful in troubleshooting, | ||
such as the command used to install PINT and whether you are using a virtualenv. | ||
* Detailed steps to reproduce the bug, as simply as possible. | ||
such as the command used to install PINT and whether you are using a virtualenv, | ||
conda environment, etc. | ||
* Detailed steps to reproduce the bug, as simply as possible. A self-contained | ||
code snippet that triggers the issue will be most helpful. | ||
|
||
Submit Feedback | ||
~~~~~~~~~~~~~~~ | ||
|
@@ -74,22 +77,37 @@ to write good documentation, you come to understand the code very well. | |
Get Started! | ||
------------ | ||
|
||
Ready to contribute? Here's how to set up PINT for local development. | ||
Ready to contribute? Here's how to set up `PINT` for local development. | ||
|
||
1. Fork_ the ``pint`` repo on GitHub. | ||
1. Fork_ the `PINT` repo on GitHub. | ||
2. Clone your fork locally:: | ||
|
||
$ git clone [email protected]:your_name_here/pint.git | ||
|
||
3. Install your local copy into a virtualenv. Assuming you have | ||
virtualenvwrapper installed, this is how you set up your fork for local | ||
3. Install your local copy into a `conda`_ environment. Assuming you have | ||
`conda` installed, this is how you set up your fork for local | ||
development:: | ||
|
||
$ mkvirtualenv pint | ||
$ conda create -n pint-devel python=3.10 | ||
$ conda activate pint-devel | ||
$ cd PINT/ | ||
$ conda install -c conda-forge --file requirements_dev.txt | ||
$ conda install -c conda-forge --file requirements.txt | ||
$ pip install -e . | ||
$ pre-commit install | ||
The last command installs pre-commit hooks which will squawk at you while trying | ||
to commit changes that don't adhere to our `Coding Style`_. | ||
|
||
Alternatively, this can also be done using `virtualenv`. Assuming you have | ||
`virtualenvwrapper` installed, this is how you set up your fork for local | ||
development:: | ||
|
||
$ mkvirtualenv pint-devel | ||
$ cd PINT/ | ||
$ pip install -r requirements_dev.txt | ||
$ pip install -r requirements.txt | ||
$ pip install -e . | ||
$ pre-commit install | ||
|
||
4. Create a branch for local development:: | ||
|
||
|
@@ -107,13 +125,13 @@ Ready to contribute? Here's how to set up PINT for local development. | |
6. Commit your changes and push your branch to GitHub:: | ||
|
||
$ git add . | ||
$ git commit -m "Your detailed description of your changes." | ||
$ git commit -m "Detailed description of your changes." | ||
$ git push origin name-of-your-bugfix-or-feature | ||
|
||
7. Submit a pull request through the GitHub website. | ||
|
||
8. Check that our automatic testing "Travis CI" passes your code. If | ||
problems crop up, fix them, commit the changes, and push a new version, | ||
8. Check that our automatic testing in "GitHub Actions" passes for your code. | ||
If problems crop up, fix them, commit the changes, and push a new version, | ||
which will automatically update the pull request:: | ||
|
||
$ git add pint/file-i-just-fixed.py | ||
|
@@ -125,21 +143,28 @@ Ready to contribute? Here's how to set up PINT for local development. | |
functional changes. If accepted, it will be merged into the master branch. | ||
|
||
.. _Fork: https://help.github.com/en/articles/fork-a-repo | ||
.. _`conda`: https://docs.conda.io/ | ||
|
||
Pull Request Guidelines | ||
----------------------- | ||
|
||
Before you submit a pull request, check that it meets these guidelines: | ||
|
||
1. Try to write clear :ref:`pythonic` code, follow our :ref:`CodingStyle`, and think | ||
1. Try to write clear `Pythonic`_ code, follow our `Coding Style`_, and think | ||
about how others might use your new code. | ||
2. The pull request should include tests that cover both the expected | ||
behavior and sensible error reporting when given bad input. | ||
3. If the pull request adds or changes functionality, the docs should | ||
be updated. Put your new functionality into a function with a | ||
docstring. Check the HTML documentation produced by ``make docs`` | ||
to make sure your new documentation appears and looks reasonable. | ||
4. The pull request should work for Python 2.7 and 3.6+. Check | ||
https://travis-ci.org/nanograv/pint/pull_requests | ||
and make sure that the tests pass for all supported Python versions. | ||
|
||
If the new functionality needs a more detailed explanation than can be | ||
put in a docstring, add it to ``docs/explanation.rst``. Make sure that | ||
the docstring contains a brief description as well. | ||
4. The pull request should work for and 3.8+. Make sure that all the | ||
CI tests for the pull request pass. | ||
5. Update ``CHANGELOG-unreleased.md`` with an appropriate entry. Please note | ||
that ``CHANGELOG.md`` should not be updated for pull requests. | ||
|
||
.. _`Pythonic`: https://peps.python.org/pep-0008/ | ||
.. _`Coding Style`: https://nanograv-pint.readthedocs.io/en/latest/coding-style.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,16 +36,17 @@ PINT | |
PINT is not TEMPO3 | ||
------------------ | ||
|
||
PINT is a project to develop a new pulsar timing solution based on | ||
PINT is a project to develop a pulsar timing solution based on | ||
python and modern libraries. It is still in active development, | ||
but it can already produce residuals from most "normal" | ||
but it is in production use by the NANOGrav collaboration and | ||
it has been demonstrated produce residuals from most "normal" | ||
timing models that agree with Tempo and Tempo2 to within ~10 | ||
nanoseconds. It can be used within python scripts or notebooks, | ||
and there are several command line tools that come with it. | ||
|
||
The primary reasons we are developing PINT are: | ||
The primary reasons PINT was developed are: | ||
|
||
* To have a robust system to check high-precision timing results that is | ||
* To have a robust system to produce high-precision timing results that is | ||
completely independent of TEMPO and Tempo2 | ||
|
||
* To make a system that is easy to extend and modify due to a good design | ||
|
@@ -57,7 +58,13 @@ IMPORTANT Notes! | |
PINT has a naming conflict with the `pint <https://pypi.org/project/Pint/>`_ units package available from PyPI (i.e. using pip) and conda. | ||
Do **NOT** ``pip install pint`` or ``conda install pint``! See below! | ||
|
||
PINT requires `longdouble` arithmetic within `numpy`, which is currently not supported natively on M1 Macs (e.g., with the `ARM64 conda build <https://conda-forge.org/blog/posts/2020-10-29-macos-arm64/>`_). So it may be better to install the standard `osx-64` build and rely on Rosetta. | ||
PINT requires ``longdouble`` (80- or 128-bit floating point) arithmetic within ``numpy``, which is currently not supported natively on M1/M2 Macs. | ||
However, you can use an x86 version of ``conda`` even on an M1/M2 Mac (which will run under Rosetta emulation): | ||
see `instructions for using Apple Intel packages on Apple | ||
silicon <https://conda-forge.org/docs/user/tipsandtricks.html#installing-apple-intel-packages-on-apple-silicon>`_. | ||
It's possible to have `parallel versions of conda for x86 and | ||
ARM <https://towardsdatascience.com/python-conda-environments-for-both-arm64-and-x86-64-on-m1-apple-silicon-147b943ffa55>`_. | ||
|
||
|
||
Installing | ||
---------- | ||
|
@@ -96,19 +103,17 @@ it, ensuring that all dependencies needed to run PINT are available:: | |
$ cd PINT | ||
$ pip install . | ||
|
||
Complete installation instructions are available here_. | ||
|
||
.. _here: https://nanograv-pint.readthedocs.io/en/latest/installation.html | ||
Complete installation instructions are available on `readthedocs <https://nanograv-pint.readthedocs.io/en/latest/installation.html>`_. | ||
|
||
|
||
Using | ||
----- | ||
|
||
See the online documentation_. Specifically: | ||
See the online documentation_. Specifically: | ||
|
||
* `tutorials <https://nanograv-pint.readthedocs.io/en/latest/tutorials.html>`_ | ||
* `Tutorials <https://nanograv-pint.readthedocs.io/en/latest/tutorials.html>`_ | ||
* `API reference <https://nanograv-pint.readthedocs.io/en/latest/reference.html>`_ | ||
* `How to's for common tasks <https://github.com/nanograv/PINT/wiki/How-To>`_ | ||
* `How-Tos for common tasks <https://github.com/nanograv/PINT/wiki/How-To>`_ | ||
|
||
Are you a NANOGrav member? Then join the #pint channel in the NANOGrav slack. | ||
|
||
|
@@ -119,10 +124,13 @@ email [email protected] or one of the people below: | |
* Paul Ray ([email protected]) | ||
* David Kaplan ([email protected]) | ||
|
||
Want to do something new? Submit a github `issue <https://github.com/nanograv/PINT/issues>`_. | ||
Want to do something new? Submit a github `issue <https://github.com/nanograv/PINT/issues>`_. | ||
|
||
.. _documentation: http://nanograv-pint.readthedocs.io/en/latest/ | ||
|
||
And for more details, please read and cite(!) the PINT paper_. | ||
|
||
.. _paper: https://ui.adsabs.harvard.edu/abs/2021ApJ...911...45L/abstract | ||
|
||
Articles that cite the PINT paper can be found in an ADS `Library <https://ui.adsabs.harvard.edu/search/q=citations(bibcode%3A2021ApJ...911...45L)&sort=date%20desc%2C%20bibcode%20desc&p_=0>`_. | ||
A list of software packages that use PINT can be found `here <https://nanograv-pint.readthedocs.io/en/latest/dependent-packages.html>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.