Skip to content
Snippets Groups Projects
Commit f94ea43b authored by David Keitel's avatar David Keitel
Browse files

Update ephemerides instructions in README.md

parent 2a2e469a
No related branches found
No related tags found
1 merge request!25ephemerides handling fixes
...@@ -12,9 +12,10 @@ we have a number of scripts demonstrating different use cases. ...@@ -12,9 +12,10 @@ we have a number of scripts demonstrating different use cases.
## Installation ## Installation
### `python` installation ### python installation
The scripts are written in `python 2.7+` and therefore require a working This package works best with `python3.5+`,
`python` installation. While many systems come with a system wide python with higher versions to be required soon.
While many systems come with a system wide python
installation, it can often be easier to manage a user-specific python installation, it can often be easier to manage a user-specific python
installation. This way one does not require root access to install or remove installation. This way one does not require root access to install or remove
modules. One method to do this, is to use the `conda` system, either through modules. One method to do this, is to use the `conda` system, either through
...@@ -82,7 +83,7 @@ $ ./configure --prefix=${HOME}/lalsuite-install --disable-all-lal --enable-lalpu ...@@ -82,7 +83,7 @@ $ ./configure --prefix=${HOME}/lalsuite-install --disable-all-lal --enable-lalpu
``` ```
### `pyfstat` installation ### PyFstat installation
The module and associated scripts can be installed system wide (or to the currently active venv), The module and associated scripts can be installed system wide (or to the currently active venv),
assuming you are in the source directory, via assuming you are in the source directory, via
...@@ -97,14 +98,37 @@ $ python -c 'import pyfstat' ...@@ -97,14 +98,37 @@ $ python -c 'import pyfstat'
if no error message is output, then you have installed `pyfstat`. Note that if no error message is output, then you have installed `pyfstat`. Note that
the module will be installed to whichever python executable you call it from. the module will be installed to whichever python executable you call it from.
### Ephemeris installation ### Ephemerides installation
The scripts require paths to earth and sun ephemeris files in order to use the PyFstat requires paths to earth and sun ephemerides files
`lalpulsar.ComputeFstat` module. This should be automatically picked up from in order to use the `lalpulsar.ComputeFstat` module and various `lalapps` tools.
the $LALPULSAR_DATADIR environment variable, defaulting to the
00-40-DE421 ephemerides or 00-19-DE421 as a backup. If you have done `pip install lalsuite`,
Alternatively, these can either be manually specified when initialising you need to manually download at least these two files:
each search (as one of the arguments), or simply by placing a file * [earth00-40-DE405.dat.gz](https://git.ligo.org/lscsoft/lalsuite/raw/master/lalpulsar/src/earth00-40-DE405.dat.gz)
* [sun00-40-DE405.dat.gz](https://git.ligo.org/lscsoft/lalsuite/raw/master/lalpulsar/src/sun00-40-DE405.dat.gz)
(Other ephemerides versions exist, but these should be sufficient for most applications.)
You then need to tell PyFstat where to find these files,
by either setting an environment variable $LALPULSAR_DATADIR
or by creating a `~/.pyfstat.conf` file as described further below.
If you are working with a virtual environment,
you should be able to get a full working ephemerides installation with these commands:
```
mkdir $VIRTUAL_ENV/share/lalpulsar
wget https://git.ligo.org/lscsoft/lalsuite/raw/master/lalpulsar/src/earth00-40-DE405.dat.gz -P $VIRTUAL_ENV/share/lalpulsar
wget https://git.ligo.org/lscsoft/lalsuite/raw/master/lalpulsar/src/sun00-40-DE405.dat.gz -P $VIRTUAL_ENV/share/lalpulsar
echo 'export LALPULSAR_DATADIR=$VIRTUAL_ENV/share/lalpulsar' >> ${VIRTUAL_ENV}/bin/activate
deactivate
source path/to/venv/bin/activate
```
If instead you have built and installed lalsuite from source,
and set your path up properly through something like
`source $MYLALPATH/etc/lalsuite-user-env.sh`,
then the ephemerides path should be automatically picked up from
the $LALPULSAR_DATADIR environment variable.
Alternatively, you can place a file
`~/.pyfstat.conf` into your home directory which looks like `~/.pyfstat.conf` into your home directory which looks like
``` ```
...@@ -113,6 +137,9 @@ sun_ephem = '/home/<USER>/lalsuite-install/share/lalpulsar/sun00-19-DE421.dat.gz ...@@ -113,6 +137,9 @@ sun_ephem = '/home/<USER>/lalsuite-install/share/lalpulsar/sun00-19-DE421.dat.gz
``` ```
Paths set in this way will take precedence over the environment variable. Paths set in this way will take precedence over the environment variable.
Finally, you can manually specify ephemerides files when initialising
each PyFstat search (as one of the arguments).
### Contributors ### Contributors
* Greg Ashton * Greg Ashton
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment