-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
**kwargs
input and anesthetic.NestedSamples
output
#90
Merged
AdamOrmondroyd
merged 95 commits into
PolyChord:master
from
AdamOrmondroyd:anesthetic_output
Jan 29, 2024
Merged
Changes from all commits
Commits
Show all changes
95 commits
Select commit
Hold shift + click to select a range
f1f52ed
neighbor spelling (assuming we're sticking to American spelling!)
AdamOrmondroyd 2f0c339
Merge branch 'PolyChord:master' into master
AdamOrmondroyd 6efc40c
updated run_poypolychord to use **kwargs rather than PolyChordSettings
AdamOrmondroyd df7b300
return anesthetic.NestedSamples output if installed
AdamOrmondroyd 3f21a7b
added kwargs to run_pypolychord() docstring
AdamOrmondroyd 85b7dfb
changed examples to use **kwargs
AdamOrmondroyd 8cfcd22
accidental rename of run_polychord()
AdamOrmondroyd 84c30c3
set kwarg defaults separately to run_pypolychord so that they can be …
AdamOrmondroyd 6fe0516
run_polychord creates the paramnames file
AdamOrmondroyd 51928d0
changed other examples paramnames are passed to run_pypolychord
AdamOrmondroyd da44aa7
mention anesthetic output in docstring (incomplete)
AdamOrmondroyd 617ad12
tidied up grade_dims and nlives argument processing
AdamOrmondroyd d375810
logx should be logc
AdamOrmondroyd 6270512
missing comma
AdamOrmondroyd 1316fa8
removed settings argument
AdamOrmondroyd 28ee39b
Restored old interface
AdamOrmondroyd 50fa72b
run_polychord -> run
AdamOrmondroyd ae5c261
reverted Python_Functions/ (apart from logx->logc correction
AdamOrmondroyd 247c51c
put PolyChordSettings back in __init__.py
AdamOrmondroyd cf54330
run() uses make_resume_file_kwargs_interface
AdamOrmondroyd dd2cf63
added run to __init__.py
AdamOrmondroyd 7c06066
update nDerived, prior and dumper to kwargs
AdamOrmondroyd 7b79d66
nDims is not a kwarg
AdamOrmondroyd 9698948
add nDerived, prior and dumper to kwargs
AdamOrmondroyd 5117092
use default_kwargs to set the defaults, then use this to see if kwarg…
AdamOrmondroyd aa64442
separate default_kwargs that refer to other default_kwargs
AdamOrmondroyd 0f153cb
wrong brackets - think it's time to leave this for a moment
AdamOrmondroyd 1ae0da3
removed accidental commas
AdamOrmondroyd 477c796
pass kwargs directly rather than creating dict
AdamOrmondroyd 0b5e998
added anesthetic to install_requires
AdamOrmondroyd 25eb130
anesthetic now assumed to be installed, so new interface always retur…
AdamOrmondroyd 4b4f29f
tidy up plotting to just use anesthetic output
AdamOrmondroyd 8da3f8b
simplified to _make_resume_file(), plus wrapper _legacy_make_resume_f…
AdamOrmondroyd 405f67d
added run_pypolychord_legacy_interface.py
AdamOrmondroyd 78a9ca8
update run() docstring to anesthetic output
AdamOrmondroyd 78654d8
removed unused sqrt from run_pypolychord.py
AdamOrmondroyd 203f117
updated run_pypolychord.ipynb with py2nb
AdamOrmondroyd 0730a18
change requirement to anesthetic==2.0.0b11
AdamOrmondroyd b963910
removed creation of .paramnames file from run(), added to run_pypolyc…
AdamOrmondroyd 805db75
corrected kwargs error message
AdamOrmondroyd 6b2ead8
exception handling if chains/ already exists
AdamOrmondroyd 07f51e7
update to anesthetic 2.0.0b12
AdamOrmondroyd 72bdea6
rather than repeating PolyChordOutput.make_paramnames_file(), make it…
AdamOrmondroyd 25198cd
changed setup.py to point to github anesthetic as 2.0.0b12 hasn't bee…
AdamOrmondroyd 52d6592
remove unecessary os import
AdamOrmondroyd 5a750fa
removed commented out/empty lines around paramname creation
AdamOrmondroyd 7f67a2a
removed unnecessary kwargs = kwargs.copy()
AdamOrmondroyd 23a766f
double quotes to be more civilised
AdamOrmondroyd 77fe885
change to single quotes to make Lucas happy
AdamOrmondroyd d05cfd2
Merge branch 'master' into anesthetic_output
williamjameshandley f860614
Merge branch 'master' into anesthetic_output
AdamOrmondroyd 83597a0
Merge branch 'master' into anesthetic_output
AdamOrmondroyd 6c650ad
update for more recent anesthetic
AdamOrmondroyd 02c3b73
line spacing and remove todo (see pr 110
AdamOrmondroyd 0f073cf
Merge remote-tracking branch 'upstream/master' into anesthetic_output
AdamOrmondroyd aed15cf
get anesthetic from pypi instead of gh
AdamOrmondroyd bd763d4
might as well do some formatting
AdamOrmondroyd bd6dff1
also fix wrap_loglikelihood for new interface (#110)
AdamOrmondroyd f6adbb5
Merge remote-tracking branch 'upstream/master' into anesthetic_output
AdamOrmondroyd 34488e7
anesthetic back to optional, return None if not installed
AdamOrmondroyd a7c3347
version bump to 1.22.0
AdamOrmondroyd 9852ba3
py2nb run_pypolychord.py
AdamOrmondroyd 5503a09
Fix names of run scripts/notebooks
AdamOrmondroyd 5b962d4
remove testing print statement
AdamOrmondroyd ca9c0c8
remove sqrt import, who knows where this came from
AdamOrmondroyd 89ed507
Updated with new recommended interface
williamjameshandley eac2ffb
Merge branch 'anesthetic_output' of github.com:AdamOrmondroyd/PolyCho…
williamjameshandley 7c8eae9
anesthetic root is deprecated
AdamOrmondroyd 2e3208d
Update README.rst
williamjameshandley e54ad78
more anesthetic 2 madness
AdamOrmondroyd b6c50ca
update notebooks
AdamOrmondroyd e646727
remove () from dict
AdamOrmondroyd 0937387
play around with tests
AdamOrmondroyd f0cdfdb
add anesthetic to CI install step
AdamOrmondroyd ddff239
only run tests on python>=3.8
AdamOrmondroyd 2dabeef
test likelihood without derived parameters
AdamOrmondroyd ae0bb6d
some test housekeeping
AdamOrmondroyd be5e7c9
Merge remote-tracking branch 'upstream/master' into anesthetic_output
AdamOrmondroyd 8143c0a
use or between the two loglikelihood return options
AdamOrmondroyd 3465c20
use pathlib.Path to save OSError nonsense
AdamOrmondroyd 9885121
explain paramnames more clearly
AdamOrmondroyd 82add9d
check that grade_dims add up to nDims and test
AdamOrmondroyd b9cc4fe
update run docstring anesthetic stuff
AdamOrmondroyd 2cae544
correct run_pypolychord return
AdamOrmondroyd 9b4be33
correct missing blank lines in run() docstring
AdamOrmondroyd 45e9f8c
add cluster_dir to kwargs, since technically it could be changed in P…
AdamOrmondroyd 387b0d0
remove os entirely in favour of pathlib
AdamOrmondroyd 4f5270f
fix line too long
AdamOrmondroyd a17d78d
update date
AdamOrmondroyd cdaf063
fix default grade_frac
AdamOrmondroyd 40cb559
remove pytest-mpi requirement from CI
AdamOrmondroyd d420526
remove unecessary cast to set
AdamOrmondroyd cc807f5
don't use ac shorthand, but also don't clutter the namespace with log…
AdamOrmondroyd 6d735e5
Revert "don't use ac shorthand, but also don't clutter the namespace …
AdamOrmondroyd 5d9dadf
from anesthetic import make_2d_axes
AdamOrmondroyd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,17 +5,17 @@ | |
:target: https://arxiv.org/abs/1506.00171 | ||
:alt: Open-access paper | ||
|
||
PolyChord v 1.21.4 | ||
PolyChord v 1.22.0 | ||
|
||
Will Handley, Mike Hobson & Anthony Lasenby | ||
|
||
[email protected] | ||
|
||
arXiv:1502.01856 | ||
`arXiv:1502.01856 <https://arxiv.org/abs/1502.01856>`_ | ||
|
||
arXiv:1506.00171 | ||
`arXiv:1506.00171 <https://arxiv.org/abs/1506.00171>`_ | ||
|
||
Latest version Released Apr 2020 | ||
Latest version Released Jan 2024 | ||
|
||
|
||
PolyChord Licence | ||
|
@@ -26,11 +26,12 @@ file. PolyChord is free for academic usage | |
|
||
Users are also required to cite the PolyChord papers: | ||
|
||
- arXiv:1502.01856 | ||
- arXiv:1506.00171 | ||
- `arXiv:1502.01856 <https://arxiv.org/abs/1502.01856>`_ | ||
- `arXiv:1506.00171 <https://arxiv.org/abs/1506.00171>`_ | ||
|
||
in their publications. | ||
|
||
|
||
Python quickstart | ||
================= | ||
|
||
|
@@ -39,34 +40,44 @@ For Python users in a hurry: | |
.. code:: bash | ||
|
||
pip install git+https://github.com/PolyChord/PolyChordLite@master | ||
wget https://raw.githubusercontent.com/PolyChord/PolyChordLite/master/run_pypolychord.py | ||
python run_pypolychord.py | ||
wget https://raw.githubusercontent.com/PolyChord/PolyChordLite/master/quickstart.py | ||
python quickstart.py | ||
|
||
You can then modify the file run_pypolychord.py to your needs. If you have mpi compilers available, this version can be run in parallel with mpi. | ||
You should make sure that you have gfortran/gcc (or equivalent) fortran compilers installed. | ||
|
||
You should make sure that you have gfortran (or equivalent) fortran compilers installed. | ||
You can then modify the file quickstart.py to your needs. If you have mpi compilers available, this version can be run in parallel with mpi. | ||
|
||
If any of the above steps fail (this can in general happen for certain Mac OSX versions), then try installing without pip: | ||
If any of the above steps fail (this can in general happen for certain macOS versions), then try installing without pip: | ||
|
||
.. code:: bash | ||
|
||
git clone https://github.com/PolyChord/PolyChordLite.git | ||
cd PolyChordLite | ||
python setup.py install | ||
|
||
or perhaps: | ||
|
||
.. code:: bash | ||
|
||
git clone https://github.com/PolyChord/PolyChordLite.git | ||
cd PolyChordLite | ||
make | ||
pip install . | ||
|
||
our apologies -- the shifting sands that are macOS do not play well with the delicate dance of fortran, C and Python that is (py)PolyChordLite. | ||
williamjameshandley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
If you do not have sudo access/virtual environments/anaconda, then appending `--user` to the install command may be necessary. | ||
|
||
Post Processing | ||
=============== | ||
|
||
We recommend the tool `anesthetic <https://github.com/handley-lab/anesthetic>`_ for post-processing your nested sampling runs. A plot gallery can be found `here <http://htmlpreview.github.io/?https://github.com/williamjameshandley/cosmo_example/blob/master/demos/demo.html>`_ | ||
We recommend the pip-installable tool `anesthetic <https://github.com/handley-lab/anesthetic>`_ for post-processing your nested sampling runs. A plot gallery can be found `here <https://anesthetic.readthedocs.io/en/latest/plotting.html>`_ | ||
|
||
.. code:: bash | ||
|
||
https://github.com/handley-lab/anesthetic | ||
pip install anesthetic | ||
|
||
``` | ||
pip install anesthetic | ||
``` | ||
If `anesthetic` is already installed, then `pypolychord.run()` will return an `anesthetic.NestedSamples` object, which can be used directly for post-processing. | ||
|
||
MPI Support | ||
=========== | ||
|
@@ -211,7 +222,6 @@ You can install direct from the git repository using: | |
|
||
pip install https://github.com/PolyChord/PolyChordLite/archive/master.zip | ||
|
||
(N.B. PyPi coming soon) | ||
or you can install locally with the command: | ||
|
||
.. code:: bash | ||
|
@@ -232,26 +242,27 @@ and check that it's working by running: | |
|
||
.. code:: bash | ||
|
||
$ python run_pypolychord.py | ||
$ python quickstart.py | ||
|
||
or in MPI: | ||
|
||
.. code:: bash | ||
|
||
$ mpirun -np 4 python run_pypolychord.py | ||
$ mpirun -np 4 python quickstart.py | ||
|
||
If so, the rest of the interface is relatively painless. Follow the example in | ||
run_pypolychord.py, and consult the docstring if you need help: | ||
quickstart.py, and consult the docstring if you need help: | ||
|
||
.. code:: python | ||
|
||
import pypolychord | ||
from pypolychord.settings import PolyChordSettings | ||
>>> import pypolychord | ||
>>> help(pypolychord.run) | ||
|
||
There is also a demo `python notebook <https://github.com/PolyChord/PolyChordLite/blob/master/quickstart.ipynb>`_. | ||
|
||
To post-process nested sampling runs we recommend the pip-installable tool `anesthetic <https://github.com/handley-lab/anesthetic>`_. A plot gallery can be found `here <https://anesthetic.readthedocs.io/en/latest/plotting.html>`_ | ||
|
||
help(pypolychord.run_polychord) | ||
help(PolyChordSettings) | ||
|
||
There is also a demo `python notebook <https://github.com/PolyChord/PolyChordLite/blob/master/run_pypolychord.ipynb>`_. | ||
|
||
Output files | ||
============= | ||
|
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
__version__ = "1.21.4" | ||
__version__ = "1.22.0" | ||
from pypolychord.settings import PolyChordSettings | ||
from pypolychord.polychord import run_polychord | ||
from pypolychord.polychord import run_polychord, run |
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe these should be added to
requirements.txt
(orrequirements_test.txt
)?