README.md 3.83 KB
Newer Older
1
2
# PyFstat

Gregory Ashton's avatar
Gregory Ashton committed
3
This is a python package providing an interface to perform F-statistic based
4
continuous gravitational wave (CW) searches.
Gregory Ashton's avatar
Gregory Ashton committed
5

6
For documentation, please use the [wiki](https://gitlab.aei.uni-hannover.de/GregAshton/PyFstat/wikis/home).
7

8
9
## Installation

Gregory Ashton's avatar
Gregory Ashton committed
10
11
12
13
14
15
16
17
18
19
### `python` installation
The scripts are written in `python 2.7+` and therefore require a working
`python` installation. While many systems come with a system wide 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
modules. One method to do this, is to use the `conda` system, either through
the stripped down [miniconda](http://conda.pydata.org/miniconda.html)
installation, or the full-featured
[anaconda](https://www.continuum.io/downloads) (these are essentially the
same, but the `anaconda` version installs a variety of useful packages such as
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
`numpy` and `scipy` by default).

The fastest/easiest method is to follow your OS instructions
[here](https://conda.io/docs/install/quick.html) which will install Miniconda.

For the rest of this tutorial, we will make use of `pip` to install modules (
not all packages can be installed with `conda` and for those using alternatives
to `conda`, `pip` is more universal).

This can be installed with
```
$ conda install pip
```

### Clone the repository

In a terminal, to clone the directory:

```
$ git clone git@gitlab.aei.uni-hannover.de:GregAshton/PyFstat.git
```
Gregory Ashton's avatar
Gregory Ashton committed
41
42
43

### Dependencies

Gregory Ashton's avatar
Gregory Ashton committed
44
`pyfstat` makes uses the following external python modules:
Gregory Ashton's avatar
Gregory Ashton committed
45
46

* [numpy](http://www.numpy.org/)
47
* [matplotlib](http://matplotlib.org/) >= 1.4
Gregory Ashton's avatar
Gregory Ashton committed
48
49
50
51
* [scipy](https://www.scipy.org/)
* [emcee](http://dan.iel.fm/emcee/current/)
* [corner](https://pypi.python.org/pypi/corner/)
* [dill](https://pypi.python.org/pypi/dill)
David Keitel's avatar
David Keitel committed
52
* [peakutils](https://pypi.python.org/pypi/PeakUtils)
Gregory Ashton's avatar
Gregory Ashton committed
53
54

*Optional*
Gregory Ashton's avatar
Gregory Ashton committed
55
56
* [tqdm](https://pypi.python.org/pypi/tqdm)(optional), if installed, this
  provides a useful progress bar and estimate of the remaining run-time.
Gregory Ashton's avatar
Gregory Ashton committed
57
58
* [bashplotlib](https://github.com/glamp/bashplotlib), if installed, presents
  a histogram of the loaded SFT data
Gregory Ashton's avatar
Gregory Ashton committed
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

For an introduction to installing modules see
[here](https://docs.python.org/3.5/installing/index.html). If you are using
`pip`, to install all of these modules, run
```
$ pip install -r /PATH/TO/THIS/DIRECTORY/requirements.txt
```

In addition to these modules, you also need a working **swig-enabled**
[`lalapps`](http://software.ligo.org/docs/lalsuite/lalsuite/) with
  at least `lalpulsar`. A minimal confuration line to use when installing
`lalapps` is

```
$ ./configure --prefix=${HOME}/lalsuite-install --disable-all-lal --enable-lalpulsar --enable-lalapps --enable-swig
```

Gregory Ashton's avatar
Gregory Ashton committed
76
77
78

### `pyfstat` installation

79
The script can be installed system wide, assuming you are in the source directory, via
80
```
81
$ python setup.py install
82
```
83
84
85
86
87
or simply add this directory to your python path. To check that the installation
was successful, run
```
$ python -c 'import pyfstat'
```
Gregory Ashton's avatar
Gregory Ashton committed
88
89
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.
90
91
92
93

### Ephemeris installation

The scripts require a path to ephemeris files in order to use the
94
`lalpulsar.ComputeFstat` module. This can either be specified when initialising
Gregory Ashton's avatar
Gregory Ashton committed
95
96
each search (as one of the arguments), or simply by placing a file
`~/.pyfstat.conf` into your home directory which looks like
97
98
99
100
101

```
earth_ephem = '/home/<USER>/lalsuite-install/share/lalpulsar/earth00-19-DE421.dat.gz'
sun_ephem = '/home/<USER>/lalsuite-install/share/lalpulsar/sun00-19-DE421.dat.gz'
```
102
here, we use the default ephemeris files provided with `lalsuite`.
103

Gregory Ashton's avatar
Gregory Ashton committed
104
### Contributors
105

Gregory Ashton's avatar
Gregory Ashton committed
106
107
108
109
110
111
112
113
* Greg Ashton
* David Keitel
* Reinhard Prix
* Karl Wette
* Sylvia Zhu

This project is open to development, please feel free to contact us
for advice or just jump in and submit a pull request.