Skip to content

Commit

Permalink
Merge pull request #294 from California-Planet-Search/next-release
Browse files Browse the repository at this point in the history
Version 1.3.6
  • Loading branch information
bjfultn authored Feb 14, 2020
2 parents b512512 + 6b38895 commit 261a820
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
1 change: 1 addition & 0 deletions docs/tutorials/GaussianProcess-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"import pandas as pd\n",
"import os\n",
"import radvel\n",
"import radvel.likelihood\n",
"from radvel.plot import orbit_plots, mcmc_plots\n",
"from scipy import optimize\n",
"\n",
Expand Down
1 change: 1 addition & 0 deletions docs/tutorials/K2-24_Fitting+MCMC.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"import corner\n",
"\n",
"import radvel\n",
"import radvel.likelihood\n",
"from radvel.plot import orbit_plots, mcmc_plots\n",
"\n",
"matplotlib.rcParams['font.size'] = 14"
Expand Down
1 change: 1 addition & 0 deletions docs/tutorials/SyntheticData.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"source": [
"%pylab inline\n",
"import radvel\n",
"import radvel.likelihood\n",
"\n",
"import corner\n",
"import copy\n",
Expand Down
Binary file modified 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.5'
__version__ = '1.3.6'
__spec__ = __name__
__package__ = __path__[0]

Expand Down
27 changes: 15 additions & 12 deletions radvel/plot/orbit_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,30 +358,33 @@ def plot_phasefold(self, pltletter, pnum):
labels = dp.labels
texlabels = dp.texlabels
units = dp.units
if units == "M$_{\\rm Jup}$":
conversion_fac = 0.00315
elif units == "M$_{\\odot}$":
conversion_fac = 0.000954265748
else:
conversion_fac = 1
derived_params = ['mpsini']
for l, par in enumerate(derived_params):
par_label = par + str(pnum)
if par_label in self.post.derived.columns:
val = self.post.derived["%s%d" % (derived_params[l], pnum)].loc[0.500]
low = self.post.derived["%s%d" % (derived_params[l], pnum)].loc[0.159]
high = self.post.derived["%s%d" % (derived_params[l], pnum)].loc[0.841]
index = np.where(np.array(labels) == par_label)[0][0]

unit = units[index]
if unit == "M$_{\\rm Jup}$":
conversion_fac = 0.00315
elif unit == "M$_{\\odot}$":
conversion_fac = 0.000954265748
else:
conversion_fac = 1

val = self.post.derived["%s%d" % (derived_params[l], pnum)].loc[0.500] * conversion_fac
low = self.post.derived["%s%d" % (derived_params[l], pnum)].loc[0.159] * conversion_fac
high = self.post.derived["%s%d" % (derived_params[l], pnum)].loc[0.841] * conversion_fac
err_low = val - low
err_high = high - val
err = np.mean([err_low, err_high])
err = radvel.utils.round_sig(err)
index = np.where(np.array(labels) == par_label)[0][0]
if err > 1e-15:
val, err, errlow = sigfig(val, err)
_anotext = r'$\mathregular{%s}$ = %s $\mathregular{\pm}$ %s %s' \
% (texlabels[index].replace("$", ""), val*conversion_fac, err*conversion_fac, units[index])
% (texlabels[index].replace("$", ""), val, err, units[index])
else:
_anotext = r'$\mathregular{%s}$ = %4.2f %s' % (texlabels[index].replace("$", ""), val*conversion_fac, units[index])
_anotext = r'$\mathregular{%s}$ = %4.2f %s' % (texlabels[index].replace("$", ""), val, units[index])

anotext += [_anotext]

Expand Down
3 changes: 1 addition & 2 deletions radvel/templates/fig_corner_derived_pars.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
\centering
{# quotes and tildes needed to render the curly braces around infile with nospaces #}
{{'\includegraphics[height=8.0in,width=6.0in,keepaspectratio]{'~infile~'}'}}
\caption{Posterior distributions for all derived parameters. $Mp\sin{i}$ is calculated under the assumption that
$Mp\sin{i}<<M{\star}$}
\caption{Posterior distributions for all derived parameters.}
\end{figure*}

0 comments on commit 261a820

Please sign in to comment.