-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1befca5
Showing
48 changed files
with
8,055 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[submodule "modules/MCcubed"] | ||
path = lisa/modules/MCcubed | ||
url = https://github.com/mdhimes/mc3 | ||
[submodule "modules/PolyChordLite"] | ||
path = lisa/modules/PolyChordLite | ||
url = https://github.com/PolyChord/PolyChordLite | ||
[submodule "lisa/modules/PyDREAM"] | ||
path = lisa/modules/PyDREAM | ||
url = https://github.com/mdhimes/PyDREAM |
Empty file.
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,38 @@ | ||
The Large-selection Interface for Sampling Algorithms (LISA), a Python | ||
interface for Markov chain and nested sampling algorithms. | ||
|
||
This project was completed with the support of the NASA Fellowship Activity, | ||
grant 80NSSC20K0682, held by Principal Investigator Joseph Harrington in | ||
support of Michael Himes, the principal developer of LISA. | ||
|
||
Copyright (C) 2020 - 2021 University of Central Florida. | ||
All rights reserved. | ||
|
||
This is a test version only, and may not be redistributed to any third | ||
party. Please refer such requests to us. This program is distributed | ||
in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | ||
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
PURPOSE. | ||
|
||
LISA is under a reproducible-research license. Until LISA's first | ||
publication, we do not permit others to redistribute the code in either | ||
original or modified form, nor to publish work based in whole or in part on | ||
the output of this code. By downloading, running, or modifying this code, | ||
you agree to these conditions. We do encourage sharing any modifications | ||
with us and discussing them openly. | ||
For more details, see | ||
https://planets.ucf.edu/resources/reproducible-research/software-license/ | ||
|
||
We welcome your feedback, but do not guarantee support. Please send | ||
feedback or inquiries to: | ||
Michael Himes <[email protected]> | ||
Joseph Harrington <[email protected]> | ||
|
||
or alternatively, | ||
Joseph Harrington and Michael Himes | ||
UCF PSB 441 | ||
4111 Libra Drive | ||
Orlando, FL 32816-2385 | ||
USA | ||
|
||
Thank you for using LISA! |
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,2 @@ | ||
recursive-include doc/ * | ||
recursive-include lisa/modules/ * |
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,13 @@ | ||
all: mc3 polychord pydream | ||
|
||
mc3: | ||
@cd ./lisa/modules/MCcubed && make | ||
@echo "Finished compiling MCcubed.\n" | ||
|
||
polychord: | ||
@cd ./lisa/modules/PolyChordLite && python setup.py --no-mpi install | ||
@echo "Finished installing pypolychord.\n" | ||
|
||
pydream: | ||
@cd ./lisa/modules/PyDREAM && python setup.py install | ||
@echo "Finished installing PyDREAM.\n" |
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,175 @@ | ||
LISA | ||
Large-selection Interface for Sampling Algorithms | ||
=============================================================================== | ||
|
||
|
||
Author : Michael D. Himes University of Central Florida | ||
Contact: [email protected] | ||
|
||
Advisor: Joseph Harrington University of Central Florida | ||
|
||
Contributors: | ||
|
||
|
||
Acknowledgements | ||
---------------- | ||
This research was supported by the NASA Fellowship Activity under NASA Grant | ||
80NSSC20K0682. We gratefully thank Nvidia Corporation for the Titan Xp GPU | ||
that was used throughout development of the software. | ||
|
||
|
||
Summary | ||
======= | ||
LISA provides an interface for a variety of sampling algorithms. Currently, | ||
the following sampling methods are available: | ||
DE-MC (ter Braak 2006), via a fork (https://github.com/mdhimes/mc3/tree/mpi) | ||
of MC3 (https://github.com/pcubillos/mc3) | ||
DE-MC with snooker updates (ter Braak & Vrugt 2008), via MC3 fork | ||
DNest4 (Brewer & Foreman-Mackey 2018) | ||
DREAM with snooker updates and multi-try (Laloy & Vrugt 2012), via PyDREAM | ||
(https://github.com/LoLab-VU/PyDREAM) | ||
dynesty (Speagle 2019; https://github.com/joshspeagle/dynesty) | ||
MULTINEST (Feroz et al. 2009), via PyMultiNest (Buchner et al. 2014; | ||
https://github.com/JohannesBuchner/PyMultiNest) | ||
PolyChord (Handley et al. 2015a, 2015b; | ||
https://github.com/PolyChord/PolyChordLite) | ||
UltraNest (Buchner 2014, 2019; https://github.com/JohannesBuchner/UltraNest) | ||
|
||
LISA comes with complete documentation as well as a user manual to assist | ||
in its usage. Users can find the latest LISA User Manual at | ||
https://exosports.github.io/LISA/doc/LISA_User_Manual.html. | ||
|
||
LISA is an open-source project that welcomes improvements from the community | ||
to be submitted via pull requests on Github. To be accepted, such improvements | ||
must be generally consistent with the existing coding style, and all changes | ||
must be updated in associated documentation. | ||
|
||
LISA is released under the Reproducible Research Software License. Users are | ||
free to use the software for personal reasons. Users publishing results from | ||
LISA or modified versions of it in a peer-reviewed journal are required to | ||
publicly release all necessary code/data to reproduce the published work. | ||
Modified versions of LISA are required to also be released open source under | ||
the same Reproducible Research License. For more details, see the text of the | ||
license. | ||
|
||
|
||
Files & Directories | ||
=================== | ||
LISA contains various files and directories, described here. | ||
|
||
doc/ - Contains documentation for LISA. The User Manual contains | ||
the information in the README with more detail, as well as a | ||
walkthrough for setup and running an example. | ||
environment.yml - Contains the required packages for LISA. | ||
example/ - Contains examples of executing LISA. | ||
LICENSE - Contains the text of the sfotware's license. | ||
lisa/ - Contains the LISA package. | ||
__init__.py - Contains the main functions to use LISA. | ||
modules/ - Contains submodules for some sampling algorithms. | ||
MCcubed - MC3 package. | ||
PolyChordLite - polychord's public release on Github. | ||
_version.py - Tracks the code's version. | ||
wrappers/ - Contains wrappers for the sampling algorithms. | ||
helper.py - Contains the parent class for samplers. | ||
Makefile - Handles building MC3. | ||
README - This file! | ||
setup.py - Used to install the package. | ||
|
||
|
||
Note that all .py files have complete documentation; consult a specific file | ||
for more details. | ||
|
||
|
||
Installation | ||
============ | ||
To build the supplied conda environment, enter | ||
conda env create -f environment.yml | ||
and activate it: | ||
conda activate lisa | ||
|
||
On some systems, this approach may fail. For a more robust approach that | ||
requires additional steps, enter | ||
conda create -n lisa python=3.7.2 | ||
conda activate lisa | ||
conda env update --file environment.yml | ||
This will build a base Python 3.7.2 environment, activate it, and then update | ||
it with the packages necessary to run LISA. | ||
|
||
Mac users may need to install additional tools: | ||
xcode-select --install | ||
This installs make, gcc, git, and other utilities needed. | ||
|
||
Now, install LISA: | ||
python setup.py install | ||
This will compile required submodules and build an importable package. | ||
|
||
To check that everything installed properly, start up a Python session and try | ||
import lisa | ||
If it succeeds without warnings about missing MultiNest files, | ||
you are now ready to use LISA! | ||
|
||
|
||
Executing LISA | ||
=============== | ||
LISA is designed to be imported into existing projects. LISA provides two | ||
functions for usage: setup instantiates a sampler, while run performs setup, | ||
runs the inference, and produces posterior plots. For example, | ||
import lisa | ||
sampler = lisa.setup('demc') | ||
will set up a DEMC sampler object. Users would then need to specify required | ||
parameters, such as the data, uncertainties, phase space, etc. For a list of | ||
the required parameters, | ||
print(sampler.reqpar) | ||
These parameters are attributes of the sampler object, and must be set to | ||
execute the inference. For example, if my data were y = x from 0 through 9, | ||
sampler.data = np.arange(10) | ||
Optional parameters are also available. View those via | ||
print(sampler.optpar) | ||
To get more information about some parameter P, there are two options: | ||
sampler.help('P') | ||
print(sampler.helpinfo['P']) | ||
|
||
Once all required parameters are specified, execute the inference via | ||
sampler.run() | ||
If the sampler object is not properly set up, LISA will print to terminal | ||
the issues that must be corrected, provided that the `verb` parameter is at | ||
least 1. After fixing them, call the run() method as before. | ||
|
||
To make plots of the posterior, enter | ||
sampler.make_plots() | ||
|
||
Alternatively, if users already know what parameters to include, | ||
sampler = lisa.run(algorithm, keyword1=parameter1, keyword2=parameter2, ...) | ||
If a required parameter is missing, users can follow the above instructions | ||
for adding the required parameters, run it, and produce plots. | ||
|
||
For more examples of how to incorporate LISA into your project, see the | ||
example/ directory. | ||
|
||
|
||
Versions | ||
======== | ||
LISA was developed on a Unix/Linux machine using the following | ||
versions of packages: | ||
- Python 3.7.2 | ||
- Numpy 1.16.2 | ||
- Matplotlib 3.0.2 | ||
- mpi4py 3.0.3 | ||
- Scipy 1.5.3 | ||
- h5py 2.9.0 | ||
- MULTINEST 3.10 | ||
- PyMultiNest 2.10 | ||
- UltraNest 2.2.2 | ||
- dynesty 1.0.1 | ||
- dnest4 0.2.4 | ||
- PyDREAM 2.0.0 | ||
|
||
|
||
Be kind | ||
======= | ||
Please note that this software has not been officially released yet; see the | ||
license for some restrictions on its usage prior to release. Upon release, | ||
we will add the relevant citation here, with a Bibtex entry. | ||
|
||
Thanks! | ||
|
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,10 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
<html lang="en" style="width:100%; height:100%;"> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||
<title>LISA User Manual</title> | ||
</head> | ||
<body style="width:100%; height:100%; margin:0;"> | ||
<iframe src="https://docs.google.com/gview?url=https://github.com/exosports/LISA/raw/gh-pages/doc/LISA_user_manual/LISA_user_manual.pdf&embedded=true" style="width:100%; height:100%;" frameborder="0"></iframe> | ||
</body> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
\relax | ||
\providecommand\hyper@newdestlabel[2]{} | ||
\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} | ||
\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined | ||
\global\let\oldnewlabel\newlabel | ||
\gdef\newlabel#1#2{\newlabelxx{#1}#2} | ||
\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} | ||
\AtEndDocument{\ifx\hyper@anchor\@undefined | ||
\let\newlabel\oldnewlabel | ||
\fi} | ||
\fi} | ||
\global\let\hyper@last\relax | ||
\gdef\HyperFirstAtBeginDocument#1{#1} | ||
\providecommand\HyField@AuxAddToFields[1]{} | ||
\providecommand\HyField@AuxAddToCoFields[2]{} | ||
\bibstyle{apj_hyperref} | ||
\@writefile{toc}{\contentsline {section}{\numberline {1}Team Members}{2}{section.1}\protected@file@percent } | ||
\newlabel{sec:team}{{1}{2}{Team Members}{section.1}{}} | ||
\@writefile{toc}{\contentsline {section}{\numberline {2}Introduction}{2}{section.2}\protected@file@percent } | ||
\newlabel{sec:theory}{{2}{2}{Introduction}{section.2}{}} | ||
\@writefile{toc}{\contentsline {section}{\numberline {3}Installation}{2}{section.3}\protected@file@percent } | ||
\newlabel{sec:installation}{{3}{2}{Installation}{section.3}{}} | ||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}System Requirements}{2}{subsection.3.1}\protected@file@percent } | ||
\newlabel{sec:requirements}{{3.1}{2}{System Requirements}{subsection.3.1}{}} | ||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Install and Compile}{3}{subsection.3.2}\protected@file@percent } | ||
\newlabel{sec:install}{{3.2}{3}{Install and Compile}{subsection.3.2}{}} | ||
\@writefile{toc}{\contentsline {section}{\numberline {4}Example}{4}{section.4}\protected@file@percent } | ||
\newlabel{sec:example}{{4}{4}{Example}{section.4}{}} | ||
\@writefile{toc}{\contentsline {section}{\numberline {5}Program Inputs}{4}{section.5}\protected@file@percent } | ||
\newlabel{sec:inputs}{{5}{4}{Program Inputs}{section.5}{}} | ||
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Sampling Algorithm}{5}{subsection.5.1}\protected@file@percent } | ||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.1.1}demc \& snooker}{5}{subsubsection.5.1.1}\protected@file@percent } | ||
\newlabel{sec:mcmc-inputs}{{5.1.1}{5}{demc \& snooker}{subsubsection.5.1.1}{}} | ||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.1.2}dream}{6}{subsubsection.5.1.2}\protected@file@percent } | ||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.1.3}dnest4}{7}{subsubsection.5.1.3}\protected@file@percent } | ||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.1.4}dynesty, multinest, polychord, \& ultranest}{8}{subsubsection.5.1.4}\protected@file@percent } | ||
\newlabel{sec:ns-inputs}{{5.1.4}{8}{dynesty, multinest, polychord, \& ultranest}{subsubsection.5.1.4}{}} | ||
\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Parameter Dictionary}{9}{subsection.5.2}\protected@file@percent } | ||
\newlabel{sec:param-desc}{{5.2}{9}{Parameter Dictionary}{subsection.5.2}{}} | ||
\@writefile{toc}{\contentsline {section}{\numberline {6}Program Outputs}{12}{section.6}\protected@file@percent } | ||
\newlabel{sec:outputs}{{6}{12}{Program Outputs}{section.6}{}} | ||
\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Returns}{12}{subsection.6.1}\protected@file@percent } | ||
\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}Output Files}{12}{subsection.6.2}\protected@file@percent } | ||
\@writefile{toc}{\contentsline {subsection}{\numberline {6.3}demc \& snooker}{12}{subsection.6.3}\protected@file@percent } | ||
\@writefile{toc}{\contentsline {subsection}{\numberline {6.4}dnest4}{13}{subsection.6.4}\protected@file@percent } | ||
\@writefile{toc}{\contentsline {subsection}{\numberline {6.5}multinest}{13}{subsection.6.5}\protected@file@percent } | ||
\@writefile{toc}{\contentsline {subsection}{\numberline {6.6}polychord}{13}{subsection.6.6}\protected@file@percent } | ||
\@writefile{toc}{\contentsline {subsection}{\numberline {6.7}ultranest}{13}{subsection.6.7}\protected@file@percent } | ||
\@writefile{toc}{\contentsline {section}{\numberline {7}FAQ}{13}{section.7}\protected@file@percent } | ||
\@writefile{toc}{\contentsline {section}{\numberline {8}Be Kind}{14}{section.8}\protected@file@percent } | ||
\newlabel{sec:bekind}{{8}{14}{Be Kind}{section.8}{}} | ||
\gdef \@abspage@last{15} |
Oops, something went wrong.