From 79ddcd32d9389cdc0984e0650010218bc8815817 Mon Sep 17 00:00:00 2001 From: BJ Fulton Date: Thu, 28 Oct 2021 10:18:56 -0700 Subject: [PATCH 01/14] increment version --- radvel/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radvel/__init__.py b/radvel/__init__.py index 718fca0f..da458153 100644 --- a/radvel/__init__.py +++ b/radvel/__init__.py @@ -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.8' +__version__ = '1.4.10' __package__ = __path__[0] MODULEDIR, filename = os.path.split(__file__) From a4da848666489c85337090af5c83e6511cd910bd Mon Sep 17 00:00:00 2001 From: Lauren <1332094+sealauren@users.noreply.github.com> Date: Wed, 26 Jan 2022 16:39:59 -0500 Subject: [PATCH 02/14] now setting the input values for phase_ncols and phase_nrows --- radvel/plot/orbit_plots.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/radvel/plot/orbit_plots.py b/radvel/plot/orbit_plots.py index 1e5f6ae1..798bb9a4 100644 --- a/radvel/plot/orbit_plots.py +++ b/radvel/plot/orbit_plots.py @@ -73,8 +73,12 @@ def __init__(self, post, saveplot=None, epoch=2450000, yscale_auto=False, yscale self.yscale_sigma = yscale_sigma if phase_ncols is None: self.phase_ncols = 1 + else: + self.phase_ncols = phase_ncols if phase_nrows is None: self.phase_nrows = self.post.likelihood.model.num_planets + else: + self.phase_nrows = phase_nrows self.uparams = uparams self.rv_phase_space = rv_phase_space self.telfmts = telfmts From cbdf75a56ec013367bf608a2bedb7adf782b7e64 Mon Sep 17 00:00:00 2001 From: Lauren <1332094+sealauren@users.noreply.github.com> Date: Wed, 26 Jan 2022 16:45:08 -0500 Subject: [PATCH 03/14] Attempting to plot the true residuals, without any trend or curvature --- radvel/plot/orbit_plots.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/radvel/plot/orbit_plots.py b/radvel/plot/orbit_plots.py index 798bb9a4..7197ae05 100644 --- a/radvel/plot/orbit_plots.py +++ b/radvel/plot/orbit_plots.py @@ -238,21 +238,21 @@ def plot_timeseries(self): def plot_residuals(self): """ - Make a plot of residuals and RV trend in the current Axes. + Make a plot of residuals in the current Axes. """ ax = pl.gca() - ax.plot(self.mplttimes, self.slope, 'b-', lw=self.fit_linewidth) + ax.plot(self.mplttimes, self.slope-self.slope, 'b-', lw=self.fit_linewidth) - plot.mtelplot(self.plttimes, self.resid, self.rverr, self.post.likelihood.telvec, ax, telfmts=self.telfmts) + plot.mtelplot(self.plttimes, self.rawresid, self.rverr, self.post.likelihood.telvec, ax, telfmts=self.telfmts) if not self.yscale_auto: - scale = np.std(self.resid) + scale = np.std(self.rawresid) ax.set_ylim(-self.yscale_sigma * scale, self.yscale_sigma * scale) if self.highlight_last: ind = np.argmax(self.plttimes) - pl.plot(self.plttimes[ind], self.resid[ind], **plot.highlight_format) + pl.plot(self.plttimes[ind], self.rawresid[ind], **plot.highlight_format) if self.set_xlim is not None: ax.set_xlim(self.set_xlim) From 8525b3e64656fda5a7d17bda8892ac8107c5f59e Mon Sep 17 00:00:00 2001 From: Lauren Weiss Date: Wed, 26 Jan 2022 18:13:19 -0500 Subject: [PATCH 04/14] Changed figheight to respect the dimensions implied by phase_ncols --- radvel/plot/orbit_plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radvel/plot/orbit_plots.py b/radvel/plot/orbit_plots.py index 7197ae05..29347ca2 100644 --- a/radvel/plot/orbit_plots.py +++ b/radvel/plot/orbit_plots.py @@ -692,7 +692,7 @@ def plot_multipanel(self, nophase=False): scalefactor = self.phase_nrows n_likes = len(self.like_list) - figheight = self.ax_rv_height*(n_likes+0.5) + self.ax_phase_height * scalefactor + figheight = self.ax_rv_height*(n_likes//phase_ncols+1.5) + self.ax_phase_height * scalefactor # provision figure fig = pl.figure(figsize=(self.figwidth, figheight)) From 42e26a58d8b0287eab788d8e39ff65477c51dc87 Mon Sep 17 00:00:00 2001 From: Lauren Weiss Date: Thu, 27 Jan 2022 10:18:43 -0500 Subject: [PATCH 05/14] minor bug fix --- radvel/plot/orbit_plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radvel/plot/orbit_plots.py b/radvel/plot/orbit_plots.py index 29347ca2..86ba323a 100644 --- a/radvel/plot/orbit_plots.py +++ b/radvel/plot/orbit_plots.py @@ -692,7 +692,7 @@ def plot_multipanel(self, nophase=False): scalefactor = self.phase_nrows n_likes = len(self.like_list) - figheight = self.ax_rv_height*(n_likes//phase_ncols+1.5) + self.ax_phase_height * scalefactor + figheight = self.ax_rv_height*(n_likes//self.phase_ncols+1.5) + self.ax_phase_height * scalefactor # provision figure fig = pl.figure(figsize=(self.figwidth, figheight)) From e085a1ba50504ca533e2dd11257f1d696dae3239 Mon Sep 17 00:00:00 2001 From: Judah Van Zandt Date: Sat, 18 Jun 2022 11:47:26 -0700 Subject: [PATCH 06/14] Replace '-inf' with '-np.inf' in model comparison table string. --- radvel/driver.py | 1 + 1 file changed, 1 insertion(+) diff --git a/radvel/driver.py b/radvel/driver.py index dc21d593..791f2d22 100644 --- a/radvel/driver.py +++ b/radvel/driver.py @@ -570,6 +570,7 @@ def report(args): "{}_radvel.stat".format(conf_base)) status = load_status(statfile) + status['ic_compare']['ic'] = status['ic_compare']['ic'].replace('-inf', '-np.inf') P, post = radvel.utils.initialize_posterior(config_file) post = radvel.posterior.load(status.get('fit', 'postfile')) From 6100225419edae96939e4fbaab5197045ca145ee Mon Sep 17 00:00:00 2001 From: Judah Van Zandt Date: Sat, 18 Jun 2022 18:56:31 -0700 Subject: [PATCH 07/14] if statement to only attempt string replacement if a model comparison has been run. --- radvel/driver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radvel/driver.py b/radvel/driver.py index 791f2d22..820023ff 100644 --- a/radvel/driver.py +++ b/radvel/driver.py @@ -570,7 +570,8 @@ def report(args): "{}_radvel.stat".format(conf_base)) status = load_status(statfile) - status['ic_compare']['ic'] = status['ic_compare']['ic'].replace('-inf', '-np.inf') + if 'ic_compare' in status.keys(): + status['ic_compare']['ic'] = status['ic_compare']['ic'].replace('-inf', '-np.inf') P, post = radvel.utils.initialize_posterior(config_file) post = radvel.posterior.load(status.get('fit', 'postfile')) From 4669a2738fbb78fcf1f33669cc7c88d79afd62be Mon Sep 17 00:00:00 2001 From: BJ Fulton Date: Thu, 15 Jun 2023 09:42:10 -0600 Subject: [PATCH 08/14] update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fc913792..82bbf005 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM conda/miniconda3 +FROM continuumio/miniconda3 ENV TERM=xterm ENV TERMINFO=/etc/terminfo @@ -9,7 +9,7 @@ ENV COVERALLS_REPO_TOKEN=7ZpQ0LQWM2PNl5iu7ZndyFEisQnZow8oT RUN mkdir /code && \ mkdir /code/radvel && \ apt-get --yes update && \ - apt-get install --yes gcc git pkg-config libhdf5-100 libhdf5-dev && \ + apt-get install --yes gcc git pkg-config libhdf5-hl-100 libhdf5-dev && \ apt-get clean && \ conda config --add channels conda-forge && \ conda config --set channel_priority strict && \ From ef5c0f9640bab8dcfe3b4555ff1fc9efa2ce9ca7 Mon Sep 17 00:00:00 2001 From: BJ Fulton Date: Thu, 15 Jun 2023 10:24:57 -0600 Subject: [PATCH 09/14] update numpy --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 19f9a52d..3c0dbb99 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cython>=0.23 -numpy>=1.16 +numpy>=1.21 scipy>=0.17 matplotlib>=1.5.3 corner>=2.0 From 78b7ba34760bd2bc41e4b52b2eac4874acb38689 Mon Sep 17 00:00:00 2001 From: BJ Fulton Date: Thu, 15 Jun 2023 10:44:05 -0600 Subject: [PATCH 10/14] update requirements --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3c0dbb99..affe281b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cython>=0.23 -numpy>=1.21 +numpy>=1.16 scipy>=0.17 matplotlib>=1.5.3 corner>=2.0 @@ -11,5 +11,5 @@ jupyter_client>=5.2.4 ipykernel>=4.10.0 jinja2>=2.9 python-dateutil>=2.5.0 -h5py==2.10.0 +h5py>=2.10.0 dill From d43a98cbb5aaaa6d37b5c82f37e4a1bf70f9696c Mon Sep 17 00:00:00 2001 From: BJ Fulton Date: Thu, 10 Aug 2023 15:52:58 -0600 Subject: [PATCH 11/14] fixed blas_opt bug --- radvel/__init__.py | 2 +- radvel/mcmc.py | 18 +++++++++--------- setup.py | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/radvel/__init__.py b/radvel/__init__.py index da458153..2bd1fdfe 100644 --- a/radvel/__init__.py +++ b/radvel/__init__.py @@ -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.10' +__version__ = '1.4.11' __package__ = __path__[0] MODULEDIR, filename = os.path.split(__file__) diff --git a/radvel/mcmc.py b/radvel/mcmc.py index f940b119..5f4e5bd1 100644 --- a/radvel/mcmc.py +++ b/radvel/mcmc.py @@ -264,15 +264,15 @@ def mcmc(post, nwalkers=50, nrun=10000, ensembles=8, checkinterval=50, minAfacto else: check_gp = isinstance(post.likelihood, radvel.likelihood.GPLikelihood) - np_info = np.__config__.blas_opt_info - if 'extra_link_args' in np_info.keys() \ - and check_gp \ - and ('-Wl,Accelerate' in np_info['extra_link_args']) \ - and serial == False: - print("WARNING: Parallel processing with Gaussian Processes will not work with your current" - + " numpy installation. See radvel.readthedocs.io/en/latest/OSX-multiprocessing.html" - + " for more details. Running in serial with " + str(ensembles) + " ensembles.") - serial = True + # np_info = np.__config__.blas_opt_info + # if 'extra_link_args' in np_info.keys() \ + # and check_gp \ + # and ('-Wl,Accelerate' in np_info['extra_link_args']) \ + # and serial == False: + # print("WARNING: Parallel processing with Gaussian Processes will not work with your current" + # + " numpy installation. See radvel.readthedocs.io/en/latest/OSX-multiprocessing.html" + # + " for more details. Running in serial with " + str(ensembles) + " ensembles.") + # serial = True statevars.ensembles = ensembles statevars.nwalkers = nwalkers diff --git a/setup.py b/setup.py index 03574f30..27544285 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_options(self) # Prevent numpy from thinking it is still in its setup process: - __builtins__.__NUMPY_SETUP__ = False + # __builtins__.__NUMPY_SETUP__ = False import numpy self.include_dirs.append(numpy.get_include()) From 5e154a450cd77337fc780a6659e0f9534a6676c4 Mon Sep 17 00:00:00 2001 From: Linus Heinke Date: Mon, 28 Aug 2023 14:42:51 +0200 Subject: [PATCH 12/14] Addition of pyproject.toml to ensure Cython gets installed before building radvel. Also changes to import of numpy. --- pyproject.toml | 2 ++ setup.py | 18 ++++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..154acea5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[build-system] +requires = ["setuptools", "wheel", "Cython", "pybind11", "numpy"] \ No newline at end of file diff --git a/setup.py b/setup.py index 03574f30..ea052324 100644 --- a/setup.py +++ b/setup.py @@ -1,16 +1,7 @@ from setuptools import setup, find_packages, Extension from setuptools.command.build_ext import build_ext as _build_ext import re - - -class build_ext(_build_ext): - def finalize_options(self): - _build_ext.finalize_options(self) - # Prevent numpy from thinking it is still in its setup process: - __builtins__.__NUMPY_SETUP__ = False - import numpy - self.include_dirs.append(numpy.get_include()) - +import numpy def get_property(prop, project): result = re.search(r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop), @@ -18,7 +9,11 @@ def get_property(prop, project): return result.group(1) -extensions = [Extension("radvel._kepler", ["src/_kepler.pyx"],)] +extensions = [ + Extension( + "radvel._kepler", ["src/_kepler.pyx"], + include_dirs=[numpy.get_include()]) +] reqs = [] for line in open('requirements.txt', 'r').readlines(): @@ -32,7 +27,6 @@ def get_property(prop, project): packages=find_packages(), setup_requires=['numpy', 'cython'], ext_modules=extensions, - cmdclass={'build_ext': build_ext}, data_files=[ ( 'radvel_example_data', From 777eb54331415918e72c5e271181ca930fefd367 Mon Sep 17 00:00:00 2001 From: BJ Fulton Date: Thu, 14 Sep 2023 11:22:17 -0600 Subject: [PATCH 13/14] fix requirements --- Dockerfile | 14 ++++++++------ docs/requirements.txt | 9 ++++++--- radvel/tests/test_api.py | 4 ++-- requirements.txt | 9 +++++---- 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 82bbf005..4bd62bdd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,12 +10,14 @@ RUN mkdir /code && \ mkdir /code/radvel && \ apt-get --yes update && \ apt-get install --yes gcc git pkg-config libhdf5-hl-100 libhdf5-dev && \ - apt-get clean && \ - conda config --add channels conda-forge && \ - conda config --set channel_priority strict && \ - conda update -n base -c defaults conda && \ - conda install --yes nomkl numpy pybind11 coveralls nose && \ - conda install --yes -c conda-forge celerite && \ + apt-get clean + +# RUN conda config --add channels conda-forge && \ +# conda config --set channel_priority strict && \ +# conda update -n base -c defaults conda + +RUN conda install --yes nomkl numpy pybind11 coveralls nose +RUN conda install --yes -c conda-forge celerite && \ conda clean -afy WORKDIR /code/radvel diff --git a/docs/requirements.txt b/docs/requirements.txt index 4faa57ce..68b4352f 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,14 +1,17 @@ -numpy>=1.11 -scipy>=0.17 +numpy==1.24.3 +scipy==1.10.1 matplotlib>=1.5.3 corner>=2.0 cython>=0.23 astropy>=1.1.2 emcee>=3.0.0 pandas>=0.20.0 -nbsphinx +nbsphinx==0.9.3 +nbconvert==7.8.0 +mistune==3.0.1 jupyter_client ipykernel pybind11 sphinx_rtd_theme mock +docutils==0.16 \ No newline at end of file diff --git a/radvel/tests/test_api.py b/radvel/tests/test_api.py index 7f93f0f2..fb5a387f 100644 --- a/radvel/tests/test_api.py +++ b/radvel/tests/test_api.py @@ -321,9 +321,9 @@ def test_model_comp(setupfn='example_planets/HD164922.py'): #test_k2() #test_hd() #test_model_comp() - #test_k2131() + test_k2131() #test_celerite() - test_basis() + # test_basis() #test_kernels() #test_kepler() #test_priors() diff --git a/requirements.txt b/requirements.txt index affe281b..c8661b6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,16 @@ cython>=0.23 -numpy>=1.16 -scipy>=0.17 +numpy==1.24.3 +scipy==1.10.1 matplotlib>=1.5.3 corner>=2.0 astropy>=1.1.2 emcee>=3.0.2 pandas>=0.20.0 -nbsphinx>=0.3.3 +nbsphinx==0.9.3 jupyter_client>=5.2.4 ipykernel>=4.10.0 jinja2>=2.9 python-dateutil>=2.5.0 -h5py>=2.10.0 +h5py>=3.9.0 dill +ipython \ No newline at end of file From 4175b55e8c0b10e5958882ae555c89312da79e23 Mon Sep 17 00:00:00 2001 From: BJ Fulton Date: Thu, 14 Sep 2023 11:37:08 -0600 Subject: [PATCH 14/14] add coveralls to reqs --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c8661b6a..8e67de39 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,4 +13,5 @@ jinja2>=2.9 python-dateutil>=2.5.0 h5py>=3.9.0 dill -ipython \ No newline at end of file +ipython +coveralls==3.2.0 \ No newline at end of file