diff --git a/.gitignore b/.gitignore index d45865a..6f232a1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,5 +18,7 @@ bgstar_emcee.py .pytest_cache/ tests/HD_131399_A_*.png tests/HD_131399_A_dynestyrun_results.pkl -tests/gaia_query_6204835284262018688.fits tests/dynesty.save +tests/yses2* +tests/YSES_2* +tests/gaia_query_* \ No newline at end of file diff --git a/README.md b/README.md index 96678cf..b2e95a3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# backtrack +# backtracks Python package to fit relative astrometry with background star motion tracks. Written by Gilles Otten (@gotten), William Balmer (@wbalmer), and Tomas Stolker (@tomasstolker). @@ -9,11 +9,11 @@ Current example (HD131399Ab) uses data from Wagner+22 and Nielsen+17. Thank you Log-likelihood borrowed heavily from `orbitize!` (BSD 3-clause). -Currently requires and python 3.9 ish and `astropy`, `corner`, `dynesty`, `matplotlib`, `numpy`, `novas`, `novas_de405`, `orbitize` and their dependencies. Note that `novas` is not supported on Windows. You can create a working environment using conda+pip via a few lines of code: +Currently requires and python >3.9,<3.11 and `astropy`, `corner`, `dynesty`, `matplotlib`, `numpy`, `novas`, `novas_de405`, `orbitize` and their dependencies. Note that `novas` is not supported on Windows (I use WSL for Windows to develop the code!). You can create a working environment using conda+pip via a few lines of code: ``` -conda create python=3.9 -n backtrack -conda activate backtrack +conda create python=3.11 -n backtracks +conda activate backtracks conda install pip pip install backtracks ``` @@ -28,8 +28,8 @@ python hd131339a.py or, to clone the repo and install in development mode (we recommend this, as the code is a work in progress and you can easily fix bugs you will likely encounter this way): ``` -conda create python=3.9 -n backtrack -conda activate backtrack +conda create python=3.11 -n backtracks +conda activate backtracks conda install pip git clone https://github.com/wbalmer/backtrack.git cd backtrack diff --git a/backtracks/backtracks.py b/backtracks/backtracks.py index d4e77bb..aec4295 100644 --- a/backtracks/backtracks.py +++ b/backtracks/backtracks.py @@ -316,7 +316,7 @@ def prior_transform(self, u): return param - def fit(self, dlogz=0.1, npool=4, dynamic=False, nlive=500, mpi_pool=False, resume=False): + def fit(self, dlogz=0.1, npool=4, dynamic=False, nlive=500, mpi_pool=False, resume=False, sample_method='unif'): """ """ print('[BACKTRACK INFO]: Beginning sampling, I hope') @@ -337,7 +337,7 @@ def fit(self, dlogz=0.1, npool=4, dynamic=False, nlive=500, mpi_pool=False, resu prior_transform=pool.prior_transform, ndim=ndim, pool=pool, - # sample='rwalk', + sample=sample_method, ) dsampler.run_nested( @@ -361,7 +361,7 @@ def fit(self, dlogz=0.1, npool=4, dynamic=False, nlive=500, mpi_pool=False, resu ndim=ndim, pool=pool, nlive=nlive, - # sample='rwalk', + sample=sample_method, ) dsampler.run_nested( @@ -390,6 +390,7 @@ def fit(self, dlogz=0.1, npool=4, dynamic=False, nlive=500, mpi_pool=False, resu prior_transform=self.prior_transform, ndim=ndim, pool=pool, + sample=sample_method, ) dsampler.run_nested( @@ -413,6 +414,7 @@ def fit(self, dlogz=0.1, npool=4, dynamic=False, nlive=500, mpi_pool=False, resu ndim=ndim, pool=pool, nlive=nlive, + sample=sample_method, ) dsampler.run_nested( diff --git a/pyproject.toml b/pyproject.toml index 5f52243..b5e52a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "backtracks" -version = "0.3.1" +version = "0.3.2" authors = [ { name="William Balmer", email="wbalmer1@jhu.com" }, { name="Gilles Otten", email="gpplotten@asiaa.sinica.edu.tw" },