PyFstat
PyFstat: a Python package for continuous gravitational-wave data analysis - Published in JOSS (2021)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 38 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
✓Committers with academic emails
7 of 11 committers (63.6%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Repository
a python package for gravitational wave analysis with the F-statistic
Basic Info
- Host: GitHub
- Owner: PyFstat
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://pyfstat.readthedocs.io
- Size: 25.4 MB
Statistics
- Stars: 50
- Watchers: 3
- Forks: 32
- Open Issues: 44
- Releases: 51
Topics
Metadata Files
README.md
PyFstat
This is a python package providing an interface to perform F-statistic based continuous gravitational wave (CW) searches, built on top of the LALSuite library.
Getting started:
* This README provides information on
installing,
contributing to
and citing PyFstat.
* PyFstat usage and its API are documented at pyfstat.readthedocs.io.
* We also have a number of tutorials and
examples, demonstrating different use cases.
You can run them locally, or online as jupyter notebooks with
binder.
* The project wiki is mainly used for developer information.
* A changelog
is also available.
* PyFstat >=2.0.0 requires a recent LALSuite (>=7.13) / lalpulsar (>=6.0)
including the SFTv3 specification.
If you need to work with older versions, the last PyFstat release supporting those was 1.19.1.
Installation
PyFstat releases can be installed in a variety of ways, including
pip install from PyPI,
conda,
Docker/Singularity images,
and from source releases on Zenodo.
Latest development versions can
also be installed with pip
or from a local git clone.
If you don't have a matching python installation
(currently 3.9 to 3.13)
on your system,
then Docker or conda are the easiest paths.
In either case, be sure to also check out the notes on dependencies and citing this work.
If you run into problems with ephemerides files, check the wiki page on ephemerides installation.
pip install from PyPI
PyPI releases are available from https://pypi.org/project/PyFstat/.
A simple
pip install pyfstat
should give you the latest release version with all dependencies;
recent releases now also include
(or pull in, via dependency)
a sufficient minimal set of ephemerides files.
If you are not installing into a venv
or conda environment
(you really should!),
on many systems you may need to use the --user flag.
Note that the PyFstat installation can fail with
Could not find a version that satisfies the requirement lalsuite
if e.g. your pip, setuptools or glibc versions are too old.
To fix the first two cases, you can run
pip install --upgrade pip setuptools
For the latter, you should likely upgrade your system.
conda installation
See this wiki page for further instructions on installing conda itself, installing PyFstat into an existing environment, or for .yml recipes to set up a PyFstat-specific environment both for normal users and for developers.
If getting PyFstat from conda-forge, it already includes the required ephemerides files.
Docker container
Ready-to-use PyFstat containers are available at the Packages
page. A GitHub account together with a personal access token is required.
Go to the wiki page
to learn how to pull them from the GitHub registry using Docker or Singularity.
pip install from github
Development versions of PyFstat can also be easily installed by
pointing pip directly to this git repository,
which will give you the latest version of the master branch:
pip install git+https://github.com/PyFstat/PyFstat
or, if you have an ssh key installed in github:
pip install git+ssh://git@github.com/PyFstat/PyFstat
This should pull in all dependencies in the same way as installing from PyPI.
install PyFstat from source (Zenodo or git clone)
You can download a source release tarball from Zenodo and extract to an arbitrary temporary directory. Alternatively, clone this repository:
git clone https://github.com/PyFstat/PyFstat.git
The module and associated scripts can be installed system wide
(or to the currently active venv),
assuming you are in the (extracted or cloned) source directory, via
python setup.py install
As a developer, alternatively
python setup.py develop
or
pip install -e /path/to/PyFstat
can be useful so you can directly see any changes you make in action.
Alternatively (not recommended!), add the source directory directly to your python path.
To check that the installation
was successful, run
python -c 'import pyfstat'
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.
This should pull in all dependencies in the same way as installing from PyPI.
Dependencies
PyFstat uses the following external python modules,
which should all be pulled in automatically if you use pip:
- corner
- dill
- lalsuite
- matplotlib
- numpy
- pathos
- ptemcee
- scipy
- solar-system-ephemerides
(from
lalsuite>7.15on) - tqdm
- versioneer
For a general introduction to installing modules, see here.
NOTE: We require a recent LALSuite (>=7.13) / lalpulsar (>=6.0).
If you need to work with older versions,
the last PyFstat release supporting those was 1.19.1.
NOTE: Through pip, we install the dependency lalsuite[lalpulsar].
The optional flag [lalpulsar] is ignored for lalsuite <= 7.15,
as those releases carry their own ephemerides.
For lalsuite > 7.15, [lalpulsar] installs solar-system-ephemerides
and uses this auxiliary package to access the ephemerides.
Optional dependencies
PyFstat manages optional dependencies through setuptool's extras_require.
Available sets of optional dependencies are:
chainconsumer(Samreay/Chainconsumer): Required to run some optional plotting methods and some of the example scripts.dev: Collectsdocs,style,testandwheel.docs: Required dependencies to build the documentation.pycuda: Required for thetCWFstatMapVersion=pycudaoption of theTransientGridSearchclass. (Note: Installing thepycudapackage, see e.g. on PyPI, requires a workingnvcccompiler in your path.)style: Includes theflake8linter (flake8.pycqa),blackstyle checker (black.readthedocs),codespelltypo checker (github.com/codespell-project/codespell), andisortfor import ordering (pycqa.github.io). These checks are required to pass by the online integration pipeline.test: For running the test suite locally using pytest and some of its addons (python -m pytest tests/).wheel: Includeswheelandcheck-wheel-contents.
Installation can be done by adding one or more of the aforementioned tags to the installation command.
For example, installing PyFstat including chainconsumer, pycuda and style dependencies would look like
(mind the lack of whitespaces!)
pip install pyfstat[chainconsumer,pycuda,style]
This command accepts the "development mode" tag -e.
Note that LALSuite is a default requirement, not an optional one,
but its installation from PyPI can be disabled
by setting the NO_LALSUITE_FROM_PYPI environment variable,
e.g. for a development install from a local git clone:
NO_LALSUITE_FROM_PYPI=1 pip install -e .
This can be useful to avoid duplication when in a conda environment
or installing LALSuite from source.
Using LALSuite built from source
Instructions to use a custom local LALSuite installation can be found in here on the wiki.
Contributing to PyFstat
This project is open to development, please feel free to contact us for advice or just jump in and submit an issue or pull request.
Here's what you need to know:
* As a developer, you should install directly from a git clone,
with either pip install -e .[dev] into some environment
or creating a development-enabled conda environment directly from the
pyfstat-dev.yml file
as explained on this wiki page.
Please also run, just once after installing:
pre-commit install
This sets up everything for automated code quality tests (see below)
to be checked for you at every commit.
* The github automated tests currently run on python [3.9,3.10,3.11,3.12]
and new PRs need to pass all these.
* You can also run the full test suite locally via pytest tests/,
or run individual tests as explained
on this page.
* The automated test on github also runs
the black style checker,
the flake8 linter,
and the isort import ordering helper.
* If you have installed the dev dependencies correctly via pip or conda,
and ran pre-commit install once,
then you're ready to let the pre-commit tool do all of this automatically for you
every time you do git commit.
For anything that would fail on the github integration tests,
it will then either automatically reformat your code to match our style
or print warnings for things to fix.
The first time it will take a while for setup,
later it should be faster.
* If for some reason you can't use pre-commit,
you can still manually run these tools before pushing changes / submitting PRs:
isort . to sort package imports,
flake8 --count --statistics . to find common coding errors and then fix them manually,
black --check --diff . to show the required style changes, or black . to automatically apply them.
codespell -w -i 3 pyfstat/core.py or similar (swap in the relevant file name) to interactively fix spelling mistakes.
Contributors
Maintainers: * Greg Ashton * David Keitel
Core contributors: * Reinhard Prix * Rodrigo Tenorio * Maria-Antonia Ferrer
Other contributors:
* Michael J. Williams
* Karl Wette
* Sylvia Zhu
* Dan Foreman-Mackey (pyfstat.gridcorner is based on DFM's corner.py)
Citing this work
If you use PyFstat in a publication we would appreciate if you cite both a release DOI for the software itself (see below)
and one or more of the following scientific papers:
* The recent JOSS (Journal of Open Source Software) paper summarising the package:
Keitel, Tenorio, Ashton & Prix 2021
(inspire:1842895
/ ADS:2021arXiv210110915K).
* The original paper introducing the package and the MCMC functionality:
Ashton&Prix 2018
(inspire:1655200
/ ADS:2018PhRvD..97j3020A).
* The methods paper introducing a Bayes factor to evaluate the multi-stage follow-up:
Tenorio, Keitel, Sintes 2021
(inspire:1865975
/ ADS:2021PhRvD.104h4012T)
* For transient searches:
Keitel&Ashton 2018
(inspire:1673205
/ ADS:2018CQGra..35t5003K).
* For glitch-robust searches:
Ashton, Prix & Jones 2018
(inspire:1672396
/ ADS:2018PhRvD..98f3011A
If you'd additionally like to cite the PyFstat package in general,
please refer to the version-independent Zenodo listing
or use directly the following BibTeX entry:
@misc{pyfstat,
author = {Ashton, Gregory and
Keitel, David and
Prix, Reinhard and
Tenorio, Rodrigo and
Ferrer, Maria-Antonia},
title = {{PyFstat}},
month = jan,
year = 2025,
publisher = {Zenodo},
doi = {10.5281/zenodo.3967045},
url = {https://doi.org/10.5281/zenodo.3967045},
note = {\url{https://doi.org/10.5281/zenodo.3967045}}
}
You can also obtain DOIs for individual versioned releases (from 1.5.x upward)
from the right sidebar at Zenodo.
Alternatively, if you've used PyFstat up to version 1.4.x in your works, the DOIs for those versions can be found from the sidebar at this older Zenodo record and please amend the BibTeX entry accordingly.
PyFstat uses the ptemcee sampler, which can be
cited as
Vousden, Far & Mandel 2015
(ADS:2016MNRAS.455.1919V)
and Foreman-Mackey, Hogg, Lang, and Goodman 2012
(2013PASP..125..306F).
PyFstat also makes generous use of functionality from the LALSuite library and it will usually be appropriate to also cite that project (see this recommended bibtex entry) and also Wette 2020 (inspire:1837108 / ADS:2020SoftX..1200634W) for the C-to-python SWIG bindings.
Owner
- Name: PyFstat
- Login: PyFstat
- Kind: organization
- Repositories: 1
- Profile: https://github.com/PyFstat
We're developing in python for detecting gravitational waves.
JOSS Publication
PyFstat: a Python package for continuous gravitational-wave data analysis
Authors
Departament de Física, Institut d'Aplicacions Computacionals i de Codi Comunitari (IAC3), Universitat de les Illes Balears, and Institut d'Estudis Espacials de Catalunya (IEEC), Crta. Valldemossa km 7.5, E-07122 Palma, Spain
Departament de Física, Institut d'Aplicacions Computacionals i de Codi Comunitari (IAC3), Universitat de les Illes Balears, and Institut d'Estudis Espacials de Catalunya (IEEC), Crta. Valldemossa km 7.5, E-07122 Palma, Spain
Tags
gravitational waves continuous waves pulsars data analysisCodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"name": "PyFstat: Continuous gravitational-wave data analysis",
"description": "PyFstat performs F-statistic-based continuous gravitational wave (CW) searches and other CW data analysis tasks. It is built on top of the LALSuite library, making its functionality more accessible through a Python interface. It also provides an MCMC-based followup of promising candidates from wide-parameter-space searches.",
"identifier": "https://doi.org/10.5281/zenodo.3967045",
"author": [
{
"@type": "Person",
"givenName": "Gregory",
"familyName": "Ashton",
"@id": "https://orcid.org/0000-0001-7288-2231"
},
{
"@type": "Person",
"givenName": "David",
"familyName": "Keitel",
"@id": "https://orcid.org/0000-0002-2824-626X"
},
{
"@type": "Person",
"givenName": "Rodrigo",
"familyName": "Tenorio",
"@id": "https://orcid.org/0000-0002-3582-2587"
},
{
"@type": "Person",
"givenName": "Reinhard",
"familyName": "Prix",
"@id": "https://orcid.org/0000-0002-3789-6424"
},
{
"@type": "Person",
"givenName": "Maria-Antonia",
"familyName": "Ferrer",
"@id": "https://orcid.org/0009-0008-9801-9506"
}
],
"citation": "Please see citation information here: https://github.com/PyFstat/PyFstat/#citing-this-work",
"codeRepository": "https://github.com/PyFstat/PyFstat/",
"referencePublication": [
{
"@type": "ScholarlyArticle",
"url": "https://arxiv.org/abs/2101.10915",
"@id": "https://arxiv.org/abs/2101.10915"
},
{
"@type": "ScholarlyArticle",
"url": "https://ui.adsabs.harvard.edu/abs/2018PhRvD..97j3020A/",
"@id": "https://doi.org/10.1103/PhysRevD.97.103020"
},
{
"@type": "ScholarlyArticle",
"url": "https://ui.adsabs.harvard.edu/abs/2018CQGra..35t5003K/",
"@id": "https://doi.org/10.1088/1361-6382/aade34"
},
{
"@type": "ScholarlyArticle",
"url": "https://ui.adsabs.harvard.edu/abs/2018PhRvD..98f3011A/",
"@id": "https://doi.org/10.1103/PhysRevD.98.063011"
}
],
"license": "https://spdx.org/licenses/MIT.html"
}
GitHub Events
Total
- Create event: 11
- Release event: 4
- Issues event: 7
- Watch event: 3
- Delete event: 11
- Issue comment event: 21
- Push event: 37
- Gollum event: 1
- Pull request event: 20
- Pull request review event: 18
- Pull request review comment event: 14
- Fork event: 2
Last Year
- Create event: 11
- Release event: 4
- Issues event: 7
- Watch event: 3
- Delete event: 11
- Issue comment event: 21
- Push event: 37
- Gollum event: 1
- Pull request event: 20
- Pull request review event: 18
- Pull request review comment event: 14
- Fork event: 2
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| David Keitel | d****l@l****g | 868 |
| Rodrigo Tenorio | r****o@l****g | 469 |
| Gregory Ashton | g****n@l****g | 422 |
| Marian Ferrer | m****a@g****m | 15 |
| Maria Antonia Ferrer | m****r@l****g | 15 |
| Reinhard Prix | r****x@a****e | 12 |
| mj-will | m****4@r****k | 2 |
| kozistr | k****r@g****m | 1 |
| dependabot[bot] | 4****] | 1 |
| Robert Rosca | 3****a | 1 |
| Daniel S. Katz | d****z@i****g | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 54
- Total pull requests: 102
- Average time to close issues: 5 months
- Average time to close pull requests: 11 days
- Total issue authors: 10
- Total pull request authors: 5
- Average comments per issue: 1.31
- Average comments per pull request: 1.92
- Merged pull requests: 91
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 6
- Pull requests: 27
- Average time to close issues: 9 days
- Average time to close pull requests: 2 days
- Issue authors: 2
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 1.48
- Merged pull requests: 24
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- dbkeitel (38)
- Rodrigo-Tenorio (11)
- LucasViktor (1)
- kof8855 (1)
- sakvaua (1)
- bhaskar-verma (1)
- ghost (1)
- LucasRr (1)
- joanrenemerou (1)
- viktorcikojevic (1)
Pull Request Authors
- dbkeitel (86)
- Rodrigo-Tenorio (18)
- maferrerma (11)
- kozistr (1)
- mj-will (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 188 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 2
(may contain duplicates) - Total versions: 71
- Total maintainers: 3
pypi.org: pyfstat
a python package for gravitational wave analysis with the F-statistic
- Homepage: https://github.com/PyFstat/PyFstat
- Documentation: https://pyfstat.readthedocs.io/
- License: MIT
-
Latest release: 2.3.0
published 7 months ago
Rankings
Maintainers (3)
conda-forge.org: pyfstat
This is a python package providing an interface to perform F-statistic based continuous gravitational wave (CW) searches.
- Homepage: https://github.com/PyFstat/PyFstat/
- License: MIT
-
Latest release: 1.18.1
published about 3 years ago
Rankings
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite
- actions/checkout v3 composite
- conda-incubator/setup-miniconda v2 composite
- actions/checkout v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v2 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pip
- pyfstat
- sphinx-gallery
- python 3.9-buster build