Skip to content

Commit

Permalink
Merge pull request #282 from California-Planet-Search/next-release
Browse files Browse the repository at this point in the history
Version 1.3.1
  • Loading branch information
bjfultn authored Nov 14, 2019
2 parents b80ddac + fcd3994 commit 2c1be09
Show file tree
Hide file tree
Showing 23 changed files with 393 additions and 157 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
omit =
*__init__*
radvel/utils.py
def _domcmc
def isnotebook

[run]
source = radvel
Expand Down
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.idea
docs
dist
build
radvel.egg-info
*.pyc
*.so
6 changes: 0 additions & 6 deletions .landscape.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
global:
CACHE_IMAGE: bjfultn/radvel

before_install:
install:
- docker pull $CACHE_IMAGE:latest || true
- docker build --cache-from $CACHE_IMAGE:latest --tag radvel .

Expand Down
19 changes: 10 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,31 @@ FROM conda/miniconda3

ENV TERM=xterm
ENV TERMINFO=/etc/terminfo
ENV PYTHONDONTWRITEBYTECODE=true
ENV COVERALLS_REPO_TOKEN=7ZpQ0LQWM2PNl5iu7ZndyFEisQnZow8oT


RUN mkdir /code && \
mkdir /code/radvel && \
apt-get --yes update && \
apt-get install --yes gcc g++ git && \
apt-get install --yes gcc git && \
apt-get clean && \
conda config --add channels conda-forge && \
conda config --set channel_priority strict && \
conda update -n base -c defaults conda && \
pip install --no-cache-dir nose coveralls pybind11 && \
conda install -y -c conda-forge celerite
conda install --yes nomkl numpy pybind11 coveralls nose && \
conda install --yes -c conda-forge celerite && \
conda clean -afy

WORKDIR /code/radvel
ADD requirements.txt /code/radvel/requirements.txt

RUN conda install -y --file requirements.txt && \
pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

ADD . /code/radvel


RUN pip install --no-cache-dir . && \
python setup.py build_ext -i

CMD nosetests radvel --with-coverage --cover-package=radvel && \
CMD pip install --no-cache-dir --no-deps . && \
python setup.py build_ext -i && \
nosetests radvel --with-coverage --cover-package=radvel && \
coveralls
13 changes: 11 additions & 2 deletions docs/tutorials/164922_Fitting+MCMC.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
}
],
"source": [
"df = radvel.mcmc(post, nrun=200)"
"df = radvel.mcmc(post, nrun=200, savename='rawchains.h5')"
]
},
{
Expand Down Expand Up @@ -503,8 +503,17 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
},
"pycharm": {
"stem_cell": {
"cell_type": "raw",
"source": [],
"metadata": {
"collapsed": false
}
}
}
},
"nbformat": 4,
"nbformat_minor": 1
}
}
13 changes: 11 additions & 2 deletions docs/tutorials/GaussianProcess-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
}
],
"source": [
"chains = radvel.mcmc(gppost,nrun=100,ensembles=3)"
"chains = radvel.mcmc(gppost,nrun=100,ensembles=3,savename='rawchains.h5')"
]
},
{
Expand Down Expand Up @@ -608,8 +608,17 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
},
"pycharm": {
"stem_cell": {
"cell_type": "raw",
"source": [],
"metadata": {
"collapsed": false
}
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
}
13 changes: 11 additions & 2 deletions docs/tutorials/K2-24_Fitting+MCMC.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
}
],
"source": [
"df = radvel.mcmc(post,nwalkers=20,nrun=400)"
"df = radvel.mcmc(post,nwalkers=20,nrun=400,savename='rawchains.h5')"
]
},
{
Expand Down Expand Up @@ -569,8 +569,17 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
},
"pycharm": {
"stem_cell": {
"cell_type": "raw",
"source": [],
"metadata": {
"collapsed": false
}
}
}
},
"nbformat": 4,
"nbformat_minor": 1
}
}
13 changes: 11 additions & 2 deletions docs/tutorials/SyntheticData.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
}
],
"source": [
"df = radvel.mcmc(post,nwalkers=20,nrun=1000)"
"df = radvel.mcmc(post,nwalkers=20,nrun=1000,savename='rawchain.h5')"
]
},
{
Expand Down Expand Up @@ -460,8 +460,17 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
},
"pycharm": {
"stem_cell": {
"cell_type": "raw",
"source": [],
"metadata": {
"collapsed": false
}
}
}
},
"nbformat": 4,
"nbformat_minor": 1
}
}
Binary file added docs/tutorials/rawchains.h5
Binary file not shown.
2 changes: 1 addition & 1 deletion radvel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _custom_warningfmt(msg, *a, **b):
__all__ = ['model', 'likelihood', 'posterior', 'mcmc', 'prior', 'utils',
'fitting', 'report', 'cli', 'driver', 'gp']

__version__ = '1.3.0'
__version__ = '1.3.1'
__spec__ = __name__
__package__ = __path__[0]

Expand Down
27 changes: 18 additions & 9 deletions radvel/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,18 @@ def main():
help="Minimum percentage of steps before convergence tests are performed [5]. \
Convergence checks will start after the minsteps threshold or the minpercent threshold has been hit."
)
psr_mcmc.add_argument('--thin', dest='thin', action='store', default=1, type=int,
help="Save one sample every N steps [default=1, save all samples]"
psr_mcmc.add_argument('--thin', dest='thin', action='store', default=10, type=int,
help="Save one sample every N steps [default=10, save every 10th sample]"
)
psr_mcmc.add_argument('--serial', dest='serial', action='store', default=False, type=bool,
help='''If True, run MCMC in serial instead of parallel. [False]'''
)
psr_mcmc.add_argument('--save', dest='save', action='store', default=False, type=bool,
help='If True, MCMC chains will be saved to be continued in a future run [False]'
)
psr_mcmc.add_argument('--proceed', dest='proceed', action='store', default=False, type=bool,
help='If True, MCMC chains will resume from the previous run'
)
psr_mcmc.set_defaults(func=radvel.driver.mcmc)

# Derive physical parameters
Expand All @@ -126,22 +132,25 @@ def main():

psr_ic.add_argument('-m', '--mixed', dest='mixed', action='store_true',
help="flag to compare all models with the fixed parameters mixed and matched rather than"
+ " treating each model comparison separately. This is the default."
+ " treating each model comparison separately. [default=True]"
)
psr_ic.add_argument('-u', '--un-mixed', dest='mixed', action='store_false',
help="flag to treat each model comparison separately (without mixing them) "
+ "rather than comparing all models with the fixed parameters mixed and matched."
help="flag to treat each model comparison separately (without mixing them) rather "
+ "than comparing all models with the fixed parameters mixed and matched. [default=False]"
)
psr_ic.add_argument('-f', '--fixjitter', dest='fixjitter', action='store_true',
help="flag to fix the stellar jitters at the nominal model best-fit value"
help="flag to fix the stellar jitters at the nominal model best-fit value [default=False]"
)
psr_ic.add_argument('-n', '--no-fixjitter', dest='fixjitter', action='store_false',
help="flag to let the stellar jitters float during model comparisons (default)"
help="flag to let the stellar jitters float during model comparisons [default=True]"
)
psr_ic.add_argument('--simple', dest='simple', action='store_true',
help="calculate goodness of fit statistics for the current model and exit [default=False]"
)
psr_ic.add_argument('-v', '--verbose', dest='verbose', action='store_true',
help="Print some more detail"
help="Print some more detail [default=False]"
)
psr_ic.set_defaults(func=radvel.driver.ic_compare, fixjitter=False, unmixed=False, mixed=True)
psr_ic.set_defaults(func=radvel.driver.ic_compare, fixjitter=False, unmixed=False, mixed=True, verbose=False)

# Tables
psr_table = subpsr.add_parser('table', parents=[psr_parent],)
Expand Down
Loading

0 comments on commit 2c1be09

Please sign in to comment.