Installation
$ pip install redback
Supported python versions: 3.7+.
This will install all requirements for running redback
for general transient fitting, including bilby and our default sampler dynesty. Other samplers will need to be
installed via pip or the appropriate means. Please look through redback
fitting documentation for what samplers are available.
Currently redback
is going significant development, and we can not guarantee that any pip or conda releases will be completely up to date.
Therefore, for the near future, we recommend installing redback
from source, and in development mode.
Install redback
from source
redback
is developed and tested with Python 3.7+. In the
following, we assume you have a working python installation, python pip,
and git.
Clone the repository, install the requirements, and then install the software:
$ git clone https://github.com/nikhil-sarin/redback
$ cd redback/
$ pip install -r requirements.txt
$ pip install .
To install with development mode, use:
$ git clone https://github.com/nikhil-sarin/redback
$ cd redback/
$ pip install -r requirements.txt
$ pip install -e .
For full functionality, please also install optional requirements.
$ pip install -r optional_requirements.txt
You are now ready to use redback. Please check out the examples
Install phantomjs
In previous releases of redback
if you wanted to use redback
functionality to download Swift data you needed to install phantomjs.
Installing phantomjs essentially requires that you first download the phantomjs file for your operating system from
the website. Then create a softlink or export the path to the bin file;
see discussion on stackoverflow.
If you use homebrew on Mac then you don’t need to follow the above steps and can simply do
$ brew install --cask phantomjs
Or use pkg installer if you are on linux.
$ sudo pkg install phantomjs
phantomjs sometimes will not work with macOS or give a warning that it is no longer supported/verified. In the short term, you can locate the file in your finder and right click to open it. Doing so once will allow the app to be used. Note phantomjs is not required for any other functionality of redback.
Phantomjs is now replaced with ChromeDriver through selenium.
Install chromedriver
and selenium
In you want to use redback
functionality to download Swift data you now need to have Google Chrome installed and update selenium.
redback
is tested with Selenium 4.18.1 so please make sure you have this version or higher.
To test if your selenium/chrome installation is ready. Please try the following code block.
$ python
>>> from selenium import webdriver
>>> driver = webdriver.Chrome()
>>> driver.get("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
If a page opens, then you are ready to start using redback
to download Swift data.
If nothing happens, you may need to install the ChromeDriver separately. You can do this via brew on MacOS
$ brew install --cask chromedriver
And on Linux and Windows you can download the ChromeDriver and add it to your path from the official chromedriver webpage. Note you do not have to do this ideally, as the ChromeDriver is included in the latest selenium package.