Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyFstat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gregory Ashton
PyFstat
Commits
87426577
Commit
87426577
authored
8 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Adds README.md and change the way ephemeris files are specified
parent
18bb2b22
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+42
-0
42 additions, 0 deletions
README.md
pyfstat.py
+14
-6
14 additions, 6 deletions
pyfstat.py
with
56 additions
and
6 deletions
README.md
0 → 100644
+
42
−
0
View file @
87426577
# PyFstat
This is a python package containing basic wrappers of the
`lalpulsar`
module
with capabilities to perform a variety of searches, primarily focussing on
semi-coherent glitch searches.
## Installation
The script can be installed system wide via
```
python setup.py install
```
or simply add this directroy to your python path
### Ephemeris installation
The scripts require a path to ephemeris files in order to use the
`lalpulsar.ComputeFstat`
module. This can either be specified when initialsing
each search, or more simply by playing a file
`~/pyfstat.conf`
in your home
directory which looks like
```
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'
```
where this uses the default ephemeris files provided with
`lalsuite`
.
### Dependencies
*
swig-enabled lalpulsar, a minimal configuration is given by
```
./configure --prefix=${HOME}/lalsuite-install --disable-all-lal --enable-lalpulsar --enable-lalapps --enable-swig
```
*
[
emcee
](
http://dan.iel.fm/emcee/current/
)[
^1
]
*
[
corner
](
https://pypi.python.org/pypi/corner/
)[
^1
]
*
[
dill
](
https://pypi.python.org/pypi/dill
)[
^1
]
[
^1
]:
Most
easily installed using either
`conda`
or
`pip`
This diff is collapsed.
Click to expand it.
pyfstat.py
+
14
−
6
View file @
87426577
...
...
@@ -18,12 +18,20 @@ import corner
import
dill
as
pickle
import
lalpulsar
try
:
from
ephemParams
import
earth_ephem
,
sun_ephem
except
(
IOError
,
ImportError
):
logging
.
warning
(
'
No ephemParams.py file found, or it does not contain
'
'
earth_ephem and sun_ephem, please provide the paths when
'
'
initialising searches
'
)
config_file
=
os
.
path
.
expanduser
(
'
~
'
)
+
'
/.pyfstat.conf
'
if
os
.
path
.
isfile
(
config_file
):
d
=
{}
with
open
(
config_file
,
'
r
'
)
as
f
:
for
line
in
f
:
k
,
v
=
line
.
split
(
'
=
'
)
k
=
k
.
replace
(
'
'
,
''
)
v
=
v
.
replace
(
'
'
,
''
)
d
[
k
]
=
v
earth_ephem
=
d
[
'
earth_ephem
'
]
sun_ephem
=
d
[
'
sun_ephem
'
]
else
:
logging
.
warning
(
'
No ~/.pyfstat.conf file found please provide the paths
'
'
when initialising searches
'
)
earth_ephem
=
None
sun_ephem
=
None
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment