Commit 22872f9d authored by Rachel Gray's avatar Rachel Gray
Browse files

Merge branch 'master' into 'master'

Update installation instructions

Closes #22

See merge request lscsoft/gwcosmo!59
parents 73ac8d3c d61a3b58
# GWcosmo
# gwcosmo
A package to estimate cosmological parameters using gravitational-wave observations. If you use GWcosmo in a scientific publication, please cite
A package to estimate cosmological parameters using gravitational-wave observations.
```
@article{Gray:2019ksv,
author = "Gray, Rachel and others",
title = "{Cosmological inference using gravitational wave standard sirens: A mock data analysis}",
eprint = "1908.06050",
archivePrefix = "arXiv",
primaryClass = "gr-qc",
reportNumber = "LIGO-P1900017",
doi = "10.1103/PhysRevD.101.122001",
journal = "Phys. Rev. D",
volume = "101",
number = "12",
pages = "122001",
year = "2020"
}
```
If you use gwcosmo in a scientific publication, please cite [R. Gray et al. Phys. Rev. D 101, 122001](https://journals.aps.org/prd/abstract/10.1103/PhysRevD.101.122001) and [R.Gray et al. arXiv:2111.04629 [astro-ph.CO]](https://arxiv.org/abs/2111.04629), and include the following statement in your manuscript: "This work makes use of gwcosmo which is available at https://git.ligo.org/lscsoft/gwcosmo".
## How-to install
You will need an [Anaconda distribution](https://www.anaconda.com/). The conda distribution is correctly initialized when, if you open your terminal, you will see the name of the python environment used. The default name is `(base)`.
Once the conda distribution is installed and activated on your machine, please follow these steps:
* Clone the gwcosmo repository with
* Clone the `gwcosmo` repository with
```
git clone <repository>
```
the name of the repository can be copied from the git interface (top right button). If you do not have ssh key on git, please use the `https` protocol
* Complete the install by following one of the options below:
* Enter in the cloned directory
### Installing with Anaconda
You will need an [Anaconda distribution](https://www.anaconda.com/). The conda distribution is correctly initialized when, if you open your terminal, you will see the name of the python environment used. The default name is `(base)`.
Once the conda distribution is installed and activated on your machine, please follow these steps:
* Enter the cloned gwcosmo directory.
* Create a conda virtual environment to host gwcosmo. Use
```
......@@ -41,10 +29,6 @@ conda create -n gwcosmo python=3.6
```
conda activate gwcosmo
```
* Run the following line to install all the python packages required by `gwcosmo`
```
pip install -r requirements
```
* Install `gwcosmo` by running
```
python setup.py install
......@@ -54,4 +38,25 @@ python setup.py install
python setup.py install --force
```
### Installing with pip and venv
`venv` is included in Python for versions >=3.3.
* Create a virtual environment to host gwcosmo. Use
```
python -m venv env
```
* When the virtual environment is ready, activate it with
```
source env/bin/activate
```
* Enter the cloned gwcosmo directory.
* Install `gwcosmo` by running
```
pip install .
```
* Alternatively, if you are planning to modify `gwcosmo` run the following instead:
```
pip install -e .
```
The `-e` stands for "editable" and means that your installation will automatically update when you make changes to the code.
......@@ -6,7 +6,6 @@ import numpy as _np
from scipy.stats import truncnorm as _truncnorm
import copy as _copy
from scipy.interpolate import interp1d as _interp1d
import bilby as _bilby
from scipy.special import erf as _erf
from scipy.special import logsumexp as _logsumexp
from scipy.integrate import cumtrapz as _cumtrapz
......
astroplan==0.7
astropy==4.1
astropy-healpix==0.5
backcall==0.2.0
bilby==1.0.4
cached-property==1.5.2
certifi==2020.12.5
cffi==1.14.4
chardet==4.0.0
corner==2.1.0
cryptography==3.4.3
cycler==0.10.0
decorator==4.4.2
dill==0.3.3
dynesty==1.0.1
emcee==3.0.2
future==0.18.2
h5py==3.1.0
healpy==1.14.0
idna==2.10
importlib-resources==5.1.0
ipykernel==5.4.3
ipython==7.16.1
ipython-genutils==0.2.0
jedi==0.18.0
jupyter-client==6.1.11
jupyter-core==4.7.1
kiwisolver==1.3.1
lalsuite==6.81
ligo-gracedb==2.7.5
ligo-segments==1.3.0
ligo.skymap==0.5.0
lscsoft-glue==2.0.0
matplotlib==3.3.4
networkx==2.5
numpy==1.19.5
pandas==1.1.5
parso==0.8.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.1.0
progressbar==2.5
prompt-toolkit==3.0.14
ptemcee==1.0.0
ptyprocess==0.7.0
pycparser==2.20
Pygments==2.7.4
pyOpenSSL==20.0.1
pyparsing==2.4.7
python-dateutil==2.8.1
python-ligo-lw==1.7.0
pytz==2021.1
PyYAML==5.4.1
pyzmq==22.0.2
reproject==0.7.1
requests==2.25.1
scipy==1.5.4
seaborn==0.11.1
setuptools-scm==5.0.1
six==1.15.0
tornado==6.1
tqdm==4.56.0
traitlets==4.3.3
urllib3==1.26.3
wcwidth==0.2.5
zipp==3.4.0
argparse
astropy
h5py
healpy
importlib-resources
lalsuite
ligo-gracedb
ligo-segments
ligo.skymap
lscsoft-glue
matplotlib>=2.0
numpy>=1.19
pandas
progressbar
scipy
seaborn
tqdm
......@@ -12,10 +12,13 @@ def readme():
with open('README.md') as f:
return f.read()
with open('requirements.txt') as f:
reqs = f.read()
setup(name='gwcosmo',
version='0.1.0',
version='1.0.0',
description='A package to estimate cosmological parameters using gravitational-wave observations',
url='https://git.ligo.org/cbc-cosmo/gwcosmo',
url='https://git.ligo.org/lscsoft/gwcosmo',
author='Cosmology R&D Group',
author_email='cbc+cosmo@ligo.org',
license='GNU',
......@@ -23,12 +26,7 @@ setup(name='gwcosmo',
package_dir={'gwcosmo': 'gwcosmo'},
scripts=['bin/gwcosmo_single_posterior', 'bin/gwcosmo_combined_posterior', 'bin/gwcosmo_compute_pdet', 'bin/gwcosmo_pixel_dag'],
include_package_data=True,
install_requires=[
'numpy>=1.9',
'matplotlib>=2.0',
'pandas',
'scipy',
'tqdm'],
install_requires=reqs,
setup_requires=setup_requires,
zip_safe=False)
  • @rachel.gray Dr. Gray. I think you should limit installation version of numpy or change recommendation Python version in README.md. When users start and follow the current installation procedure in README.md, users will face the error from Python version. In current content, the code will search the latest version of numpy. Current version of numpy is 1.22.0rc1. It requires python>=3.8. However, the Installation with Anaconda in README.md only use python3.6.

    Edited by Hsiang-Yu Huang
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment