README.md 3.96 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
`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

Gregory Ashton's avatar
Gregory Ashton committed
36
In a terminal, clone the directory:
37
38

```
Gregory Ashton's avatar
Gregory Ashton committed
39
$ git clone https://gitlab.aei.uni-hannover.de/GregAshton/PyFstat.git
40
```
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
59
60
* [pathos](https://pypi.python.org/pypi/pathos), if installed, this provides
  support for multiprocessing some functions.
Gregory Ashton's avatar
Gregory Ashton committed
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

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
78
79
80

### `pyfstat` installation

81
The script can be installed system wide, assuming you are in the source directory, via
82
```
83
$ python setup.py install
84
```
85
86
87
88
89
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
90
91
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.
92
93
94
95

### Ephemeris installation

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

```
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'
```
104
here, we use the default ephemeris files provided with `lalsuite`.
105

Gregory Ashton's avatar
Gregory Ashton committed
106
### Contributors
107

Gregory Ashton's avatar
Gregory Ashton committed
108
109
110
111
112
113
114
115
* 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.