Skip to content

Commit

Permalink
Merge pull request #340 from California-Planet-Search/next-release
Browse files Browse the repository at this point in the history
Version 1.4.3
  • Loading branch information
bjfultn authored Dec 4, 2020
2 parents b241f74 + 42144b3 commit b582fcf
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/autocorrintro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ using the ``minAfactor`` argument when calling the MCMC.

The autocorrelation factor is calculated for each parameter and the minimum of these values
is returned in real time as the MCMC run progresses.
Once the minimum autocorrelation factor is below ``minAfactor``, this criterion
Once the minimum autocorrelation factor is above ``minAfactor``, this criterion
for convergence is met. Whether or not ``minAfactor`` has been satisfied can be seen in the autocorrelation plot below. Once the
maximum autocorrelation time has passed the dashed line labeled 'Autocorrelation Factor Criterion,' the chain is likely converged. After five consecutive status checks appear past the dashed line, the MCMC will halt if all other criterion have also been met.

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/GaussianProcess-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
" )\n",
" # Add in instrument parameters\n",
" like.params['gamma_'+tel_suffix] = radvel.Parameter(value=np.mean(vel[indices]), vary=False, linear=True)\n",
" like.params['jit_'+tel_suffix] = radvel.Parameter(value=jit_guesses[tel_suffix], vary=False, linear=True) \n",
" like.params['jit_'+tel_suffix] = radvel.Parameter(value=jit_guesses[tel_suffix], vary=True)\n",
" likes.append(like)\n",
"\n",
"\n",
Expand Down Expand Up @@ -594,4 +594,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
2 changes: 1 addition & 1 deletion radvel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _custom_warningfmt(msg, *a, **b):
__all__ = ['model', 'likelihood', 'posterior', 'mcmc', 'prior', 'utils',
'fitting', 'report', 'cli', 'driver', 'gp']

__version__ = '1.4.2'
__version__ = '1.4.3'
__spec__ = __name__
__package__ = __path__[0]

Expand Down
4 changes: 2 additions & 2 deletions radvel/mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def mcmc(post, nwalkers=50, nrun=10000, ensembles=8, checkinterval=50, minAfacto
if proceedname is None:
raise ValueError('proceed set to true but no proceedname provided')
else:
h5p = h5py.File(savename, 'r')
h5p = h5py.File(proceedname, 'r')
msg = 'Loading chains and run information from previous MCMC'
print(msg)
statevars.prechains = []
Expand Down Expand Up @@ -328,7 +328,7 @@ def mcmc(post, nwalkers=50, nrun=10000, ensembles=8, checkinterval=50, minAfacto
if not proceed:
statevars.initial_positions.append(p0)
else:
statevars.initial_positions.append(statevars.prechains[i][-1, :, :])
statevars.initial_positions.append(statevars.prechains[e][-1, :, :])
statevars.samplers.append(emcee.EnsembleSampler(statevars.nwalkers, statevars.ndim, post.logprob_array,
threads=1))

Expand Down
4 changes: 2 additions & 2 deletions radvel/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,13 @@ def dict_to_vector(self):
self.vector = vector

def vector_names(self):
names = [0] * (len(self.params.keys()))
names = [0] * (len(self.params.keys()) + 2)
for key in self.params.keys():
try:
names[self.indices[key]] = key
except KeyError:
pass
self.names = names
self.names = [i for i in names if type(i) == str]

def vector_to_dict(self):
for key in self.params.keys():
Expand Down
6 changes: 4 additions & 2 deletions radvel/plot/orbit_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from matplotlib import pyplot as pl
from matplotlib.ticker import MaxNLocator
from astropy.time import Time
import copy

import radvel
from radvel import plot
Expand Down Expand Up @@ -65,7 +66,7 @@ def __init__(self, post, saveplot=None, epoch=2450000, yscale_auto=False, yscale
figwidth=7.5, fit_linewidth=2.0, set_xlim=None, text_size=9, highlight_last=False,
show_rms=False, legend_kwargs=dict(loc='best'), status=None):

self.post = post
self.post = copy.deepcopy(post)
self.saveplot = saveplot
self.epoch = epoch
self.yscale_auto = yscale_auto
Expand Down Expand Up @@ -103,7 +104,8 @@ def __init__(self, post, saveplot=None, epoch=2450000, yscale_auto=False, yscale

# convert params to synth basis
synthparams = self.post.params.basis.to_synth(self.post.params)
self.post.params.update(synthparams)
self.post.params = synthparams
self.post.vector.dict_to_vector()

self.model = self.post.likelihood.model
self.rvtimes = self.post.likelihood.x
Expand Down

0 comments on commit b582fcf

Please sign in to comment.