riptide-ffa 0.2.5__tar.gz → 0.2.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. riptide_ffa-0.2.7/.github/workflows/CI.yml +40 -0
  2. riptide_ffa-0.2.7/.github/workflows/publish.yml +36 -0
  3. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7}/.gitignore +15 -9
  4. riptide_ffa-0.2.7/.readthedocs.yaml +18 -0
  5. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7}/CHANGELOG.md +14 -0
  6. riptide_ffa-0.2.7/Makefile +53 -0
  7. riptide_ffa-0.2.7/PKG-INFO +104 -0
  8. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7}/README.md +4 -5
  9. riptide_ffa-0.2.7/docs/Makefile +20 -0
  10. riptide_ffa-0.2.7/docs/source/conf.py +58 -0
  11. riptide_ffa-0.2.7/docs/source/docker.rst +18 -0
  12. riptide_ffa-0.2.7/docs/source/images/J1855+0307_folded.png +0 -0
  13. riptide_ffa-0.2.7/docs/source/images/J1855+0307_folded_dereddened.png +0 -0
  14. riptide_ffa-0.2.7/docs/source/images/J1855+0307_pgram.png +0 -0
  15. riptide_ffa-0.2.7/docs/source/images/J1855+0307_pgram_zoom.png +0 -0
  16. riptide_ffa-0.2.7/docs/source/images/J1932-3655_blind_detection.png +0 -0
  17. riptide_ffa-0.2.7/docs/source/images/J1932-3655_psrchive_small.png +0 -0
  18. riptide_ffa-0.2.7/docs/source/index.rst +52 -0
  19. riptide_ffa-0.2.7/docs/source/installation.rst +31 -0
  20. riptide_ffa-0.2.7/docs/source/kernfuncs.rst +13 -0
  21. riptide_ffa-0.2.7/docs/source/pipeline.rst +321 -0
  22. riptide_ffa-0.2.7/docs/source/quickstart.rst +263 -0
  23. riptide_ffa-0.2.7/docs/source/reference.rst +74 -0
  24. riptide_ffa-0.2.7/pyproject.toml +102 -0
  25. riptide_ffa-0.2.7/setup.cfg +4 -0
  26. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7}/setup.py +10 -11
  27. riptide_ffa-0.2.7/src/riptide/__init__.py +33 -0
  28. riptide_ffa-0.2.7/src/riptide/_version.py +24 -0
  29. riptide_ffa-0.2.7/src/riptide/apps/rseek.py +196 -0
  30. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/candidate.py +104 -102
  31. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/clustering.py +9 -11
  32. riptide_ffa-0.2.7/src/riptide/constants.py +5 -0
  33. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/cpp/downsample.hpp +7 -3
  34. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/cpp/python_bindings.cpp +0 -30
  35. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/ffautils.py +2 -0
  36. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/folding.py +13 -7
  37. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/libffa.py +43 -50
  38. riptide_ffa-0.2.7/src/riptide/metadata.py +161 -0
  39. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/peak_detection.py +68 -52
  40. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/periodogram.py +39 -30
  41. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/pipeline/__init__.py +7 -1
  42. riptide_ffa-0.2.7/src/riptide/pipeline/config_models.py +171 -0
  43. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/pipeline/dmiter.py +121 -74
  44. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/pipeline/harmonic_testing.py +50 -36
  45. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/pipeline/peak_cluster.py +44 -28
  46. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/pipeline/pipeline.py +206 -190
  47. riptide_ffa-0.2.7/src/riptide/pipeline/worker_pool.py +76 -0
  48. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/reading/__init__.py +5 -0
  49. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/reading/presto.py +56 -51
  50. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/reading/sigproc.py +55 -45
  51. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/running_medians.py +11 -9
  52. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/search.py +25 -16
  53. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/serialization.py +56 -54
  54. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/time_series.py +118 -83
  55. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/timing.py +7 -4
  56. riptide_ffa-0.2.7/src/riptide_ffa.egg-info/PKG-INFO +104 -0
  57. riptide_ffa-0.2.7/src/riptide_ffa.egg-info/SOURCES.txt +94 -0
  58. riptide_ffa-0.2.7/src/riptide_ffa.egg-info/requires.txt +23 -0
  59. riptide_ffa-0.2.7/src/riptide_ffa.egg-info/scm_file_list.json +89 -0
  60. riptide_ffa-0.2.7/src/riptide_ffa.egg-info/scm_version.json +8 -0
  61. riptide_ffa-0.2.7/tests/__init__.py +0 -0
  62. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/presto_generation.py +23 -10
  63. riptide_ffa-0.2.7/tests/test_config_models.py +52 -0
  64. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/test_ffa_base_functions.py +45 -45
  65. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/test_ffa_search_pgram.py +31 -26
  66. riptide_ffa-0.2.7/tests/test_metadata.py +35 -0
  67. riptide_ffa-0.2.7/tests/test_pipeline.py +106 -0
  68. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/test_rseek.py +33 -20
  69. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/test_running_median.py +20 -15
  70. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/test_snr.py +18 -12
  71. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/test_time_series.py +67 -51
  72. riptide-ffa-0.2.5/.coveragerc +0 -17
  73. riptide-ffa-0.2.5/.readthedocs.yaml +0 -21
  74. riptide-ffa-0.2.5/.travis.yml +0 -30
  75. riptide-ffa-0.2.5/MANIFEST.in +0 -9
  76. riptide-ffa-0.2.5/Makefile +0 -40
  77. riptide-ffa-0.2.5/PKG-INFO +0 -307
  78. riptide-ffa-0.2.5/pyproject.toml +0 -11
  79. riptide-ffa-0.2.5/riptide/__init__.py +0 -48
  80. riptide-ffa-0.2.5/riptide/_version.py +0 -16
  81. riptide-ffa-0.2.5/riptide/apps/rseek.py +0 -176
  82. riptide-ffa-0.2.5/riptide/metadata.py +0 -119
  83. riptide-ffa-0.2.5/riptide/pipeline/config_validation.py +0 -198
  84. riptide-ffa-0.2.5/riptide/pipeline/worker_pool.py +0 -71
  85. riptide-ffa-0.2.5/riptide/tests/__init__.py +0 -1
  86. riptide-ffa-0.2.5/riptide/tests/run_tests.py +0 -11
  87. riptide-ffa-0.2.5/riptide/tests/test_pipeline.py +0 -169
  88. riptide-ffa-0.2.5/riptide_ffa.egg-info/PKG-INFO +0 -307
  89. riptide-ffa-0.2.5/riptide_ffa.egg-info/SOURCES.txt +0 -78
  90. riptide-ffa-0.2.5/riptide_ffa.egg-info/not-zip-safe +0 -1
  91. riptide-ffa-0.2.5/riptide_ffa.egg-info/requires.txt +0 -13
  92. riptide-ffa-0.2.5/setup.cfg +0 -51
  93. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7}/LICENSE +0 -0
  94. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/cpp/README.md +0 -0
  95. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/cpp/block.hpp +0 -0
  96. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/cpp/kernels.hpp +0 -0
  97. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/cpp/periodogram.hpp +0 -0
  98. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/cpp/running_median.hpp +0 -0
  99. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/cpp/snr.hpp +0 -0
  100. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/cpp/transforms.hpp +0 -0
  101. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide/pipeline/config/example.yaml +0 -0
  102. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide_ffa.egg-info/dependency_links.txt +0 -0
  103. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide_ffa.egg-info/entry_points.txt +0 -0
  104. {riptide-ffa-0.2.5 → riptide_ffa-0.2.7/src}/riptide_ffa.egg-info/top_level.txt +0 -0
  105. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/data/README.md +0 -0
  106. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/data/fake_presto_radio.dat +0 -0
  107. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/data/fake_presto_radio.inf +0 -0
  108. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/data/fake_presto_radio_breaks.dat +0 -0
  109. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/data/fake_presto_radio_breaks.inf +0 -0
  110. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/data/fake_presto_xray.dat +0 -0
  111. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/data/fake_presto_xray.inf +0 -0
  112. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/data/fake_sigproc_float32.tim +0 -0
  113. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/data/fake_sigproc_int8.tim +0 -0
  114. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/data/fake_sigproc_uint8.tim +0 -0
  115. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/data/fake_sigproc_uint8_nosignedkey.tim +0 -0
  116. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/pipeline_config_A.yml +0 -0
  117. {riptide-ffa-0.2.5/riptide → riptide_ffa-0.2.7}/tests/pipeline_config_B.yml +0 -0
@@ -0,0 +1,40 @@
1
+ name: CI
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ # See: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-running-a-job-within-a-container
9
+ continuous-integration:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
14
+
15
+ steps:
16
+ - name: Checkout
17
+ uses: actions/checkout@v4
18
+ - name: Set up Python ${{ matrix.python-version }}
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+ - name: Install
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ make install
26
+ - name: Build documentation
27
+ if: matrix.python-version == '3.12'
28
+ run: make docs
29
+ - name: Lint
30
+ run: make lint
31
+ - name: Test
32
+ run: |
33
+ make test
34
+ - name: Check source distribution
35
+ if: matrix.python-version == '3.12'
36
+ run: make check-sdist
37
+ - name: Upload coverage reports to Codecov
38
+ uses: codecov/codecov-action@v5
39
+ env:
40
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,36 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.12"
20
+
21
+ - name: Install
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ make install
25
+
26
+ - name: Test
27
+ run: make test
28
+
29
+ - name: Build source distribution
30
+ run: python -m build --sdist
31
+
32
+ - name: Upload to PyPI
33
+ env:
34
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
35
+ TWINE_USERNAME: __token__
36
+ run: python -m twine upload dist/*.tar.gz
@@ -1,13 +1,19 @@
1
- *.o
2
- *.so
3
- *.pyc
4
- __pycache__
1
+ dist
2
+ build
3
+ .egg
4
+ .nox
5
5
  .vscode
6
- *.egg-info
7
6
  .coverage
8
- .eggs
7
+ __pycache__
8
+ .mypy_cache
9
+ docs/_build
9
10
  .pytest_cache
10
- tmp
11
- build
12
- dist
13
11
  pip-wheel-metadata
12
+ .ipynb_checkpoints
13
+ src/riptide/_version.py
14
+
15
+ *.o
16
+ *.so
17
+ *.egg
18
+ *.py[cod]
19
+ *.egg-info
@@ -0,0 +1,18 @@
1
+ # Read the Docs configuration file for Sphinx projects
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+ version: 2
4
+
5
+ build:
6
+ os: ubuntu-22.04
7
+ tools:
8
+ python: "3.12"
9
+
10
+ python:
11
+ install:
12
+ - method: pip
13
+ path: .
14
+ extra_requirements:
15
+ - docs
16
+
17
+ sphinx:
18
+ configuration: docs/source/conf.py
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 0.2.7 - 2026-09-20
8
+
9
+ Internal refactoring and improvements: Fix documentation, add CI stages to check source distribution build, add linting with `ruff` and make a general code cleanup pass.
10
+
11
+ ## 0.2.6 - 2026-09-10
12
+
13
+ This version modernises the project layout and packaging, and fixes issues in candidate plotting and downsampled variance calculations.
14
+
15
+ ### Fixed
16
+
17
+ - Candidate plots now normalise each sub-integration independently for better contrast, contributed by Dejiang Yin.
18
+ - Corrected the downsampled variance calculation for factors very close to an integer, thanks to Francesco Coti Zelati for reporting the issue.
19
+
20
+
7
21
  ## 0.2.5 - 2023-12-23
8
22
 
9
23
  This version fixes an installation error on recent OSX versions, and a segmentation fault that triggers in some edge cases.
@@ -0,0 +1,53 @@
1
+ .DEFAULT_GOAL := help
2
+ PKG = riptide-ffa
3
+ DOCS_SPHINXOPTS = --fail-on-warning --nitpicky --keep-going
4
+
5
+ check-sdist: ## Build and smoke-test the source distribution in a temporary virtualenv
6
+ @set -eu; \
7
+ tmpdir="$$(mktemp -d)"; \
8
+ on_exit() { \
9
+ status=$$?; \
10
+ if [ "$$status" -eq 0 ]; then \
11
+ printf '\033[1;32m✅ Source distribution smoke test passed\033[0m\n'; \
12
+ else \
13
+ printf '\033[1;31m❌ Source distribution smoke test failed\033[0m\n' >&2; \
14
+ fi; \
15
+ rm -rf "$$tmpdir"; \
16
+ exit "$$status"; \
17
+ }; \
18
+ trap on_exit EXIT; \
19
+ python -m build --sdist --outdir "$$tmpdir/dist"; \
20
+ python -m venv "$$tmpdir/venv"; \
21
+ "$$tmpdir/venv/bin/python" -m pip install "$$tmpdir"/dist/*.tar.gz; \
22
+ cd "$$tmpdir"; \
23
+ "$$tmpdir/venv/bin/python" -c "import riptide; print(riptide.__version__)"; \
24
+ "$$tmpdir/venv/bin/rffa" --help >/dev/null; \
25
+ "$$tmpdir/venv/bin/rseek" --help >/dev/null
26
+
27
+ docs: ## Build clean HTML documentation in docs/build/html
28
+ $(MAKE) -C docs clean html SPHINXOPTS="$(DOCS_SPHINXOPTS)"
29
+
30
+ install: ## Install the package in editable mode with dev and docs dependencies
31
+ pip install -e '.[dev,docs]'
32
+
33
+ lint: ## Run the linter
34
+ ruff check src tests
35
+
36
+ # GLORIOUS hack to autogenerate Makefile help
37
+ # This simply parses the double hashtags that follow each Makefile command
38
+ # https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
39
+ help: ## Print this help message
40
+ @echo "Makefile help for ${PKG}"
41
+ @echo "===================================================================="
42
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
43
+
44
+ test: ## Run the unit tests and print a coverage report
45
+ pytest --cov=src/ --cov-report=term-missing
46
+
47
+ ci: ## Run all checks for continuous integration
48
+ $(MAKE) docs
49
+ $(MAKE) lint
50
+ $(MAKE) test
51
+ $(MAKE) check-sdist
52
+
53
+ .PHONY: check-sdist docs install lint help test ci
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.4
2
+ Name: riptide-ffa
3
+ Version: 0.2.7
4
+ Summary: Pulsar searching with the Fast Folding Algorithm (FFA)
5
+ Author-email: Vincent Morello <vmorello@gmail.com>
6
+ Maintainer-email: Vincent Morello <vmorello@gmail.com>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/v-morello/riptide
9
+ Project-URL: Documentation, https://riptide-ffa.readthedocs.io
10
+ Project-URL: Repository, https://github.com/v-morello/riptide
11
+ Project-URL: Issues, https://github.com/v-morello/riptide/issues
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: C++
18
+ Classifier: Operating System :: Unix
19
+ Classifier: Operating System :: MacOS :: MacOS X
20
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: astropy>=5.0
25
+ Requires-Dist: matplotlib>=3.6
26
+ Requires-Dist: numpy>=1.23
27
+ Requires-Dist: pandas>=1.5
28
+ Requires-Dist: pydantic<3,>=2
29
+ Requires-Dist: pyyaml>=6.0
30
+ Requires-Dist: threadpoolctl>=3.1
31
+ Provides-Extra: docs
32
+ Requires-Dist: sphinx<8,>=7.4; python_version < "3.11" and extra == "docs"
33
+ Requires-Dist: sphinx<9,>=8.2; python_version >= "3.11" and extra == "docs"
34
+ Requires-Dist: sphinx-rtd-theme<4,>=3; extra == "docs"
35
+ Provides-Extra: dev
36
+ Requires-Dist: build>=1.0; extra == "dev"
37
+ Requires-Dist: pytest>=7.0; extra == "dev"
38
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
39
+ Requires-Dist: ruff>=0.11; extra == "dev"
40
+ Requires-Dist: twine>=4.0; extra == "dev"
41
+ Dynamic: license-file
42
+
43
+ [![arXiv](http://img.shields.io/badge/astro.ph-2004.03701-B31B1B.svg)](https://arxiv.org/abs/2004.03701) ![License](https://img.shields.io/badge/License-MIT-green.svg) ![Python versions](https://img.shields.io/pypi/pyversions/riptide-ffa.svg) ![CI status](https://github.com/v-morello/riptide/actions/workflows/CI.yml/badge.svg?branch=master) [![codecov](https://codecov.io/gh/v-morello/riptide/branch/master/graph/badge.svg)](https://codecov.io/gh/v-morello/riptide)
44
+
45
+ # riptide
46
+
47
+ __riptide__ ("sea**r**ch**i**ng for **p**ulsars in the **ti**me **d**omain") is a pulsar searching package implementing the Fast Folding Algorithm (FFA), the theoretically optimal search method for periodic signals. Its interface is entirely in python while the core algorithms are implemented in C. riptide provides:
48
+
49
+ * A library of functions and classes to use interactively to process dedispersed time series
50
+ * A pipeline executable to process a set of DM trials and output a list of candidate files and other useful data products
51
+
52
+ ## Citation
53
+
54
+ If using ``riptide`` contributes to a project that leads to a scientific publication, please cite the article:
55
+ ["Optimal periodicity searching: Revisiting the Fast Folding Algorithm for large scale pulsar surveys"](https://arxiv.org/abs/2004.03701)
56
+
57
+
58
+ ## Sensitivity of the FFA
59
+
60
+ The article covers the topic of the FFA's sensitivity in theory, here is a practical example on a faint source. Below is an L-band observation of [PSR J1932-3655](https://www.atnf.csiro.au/people/joh414/ppdata/1932-3655.html) from the [SUPERB survey](https://arxiv.org/abs/1706.04459), significantly offset from the true position of the source. The first plot was obtained by folding the observation using the known ephemeris of the pulsar with [PSRCHIVE](http://psrchive.sourceforge.net/). This is one of the faintest known pulsar instances identifiable in the survey.
61
+
62
+ ![psrchive_plot](docs/source/images/J1932-3655_psrchive_small.png "PSRCHIVE direct ephemeris folding")
63
+
64
+ And below is a blind detection of the pulsar, running `riptide` on the same observation:
65
+ ![riptide_plot](docs/source/images/J1932-3655_blind_detection.png "riptide blind detection")
66
+
67
+
68
+ ## Documentation
69
+
70
+ A quickstart guide, a pipeline configuration tutorial and the full API documentation can be found [here](https://riptide-ffa.readthedocs.io).
71
+
72
+ ## Installation
73
+
74
+ The easiest method is to use pip install, which pulls the latest release from the python package index and installs all required dependencies:
75
+ ```
76
+ pip install riptide-ffa
77
+ ```
78
+
79
+ The alternative is to clone the repository, especially if you want the absolute latest version:
80
+ ```bash
81
+ git clone https://github.com/v-morello/riptide
82
+ ```
83
+
84
+ And then in the base directory of `riptide` run
85
+
86
+ ```bash
87
+ make install
88
+ ```
89
+
90
+ This runs ``pip install`` in [editable mode](https://pip.pypa.io/en/latest/reference/pip_install/#editable-installs), which means you can freely edit the code. It also installs the development and documentation dependencies. The installer adds links to two command-line apps in your python environment using [console_scripts entry points](https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html):
91
+
92
+ * `rffa`: The full end-to-end pipeline to search multiple DM trials, see below for details on how to use it.
93
+ * `rseek`: A lightweight app to search a single time series and print significant candidates found, useful for quick data checks.
94
+
95
+ You may check that it all works by typing:
96
+ ```
97
+ rffa -h
98
+ rseek -h
99
+ ```
100
+ And you should see the full help of both applications.
101
+
102
+
103
+
104
+
@@ -1,4 +1,4 @@
1
- [![arXiv](http://img.shields.io/badge/astro.ph-2004.03701-B31B1B.svg)](https://arxiv.org/abs/2004.03701) ![License](https://img.shields.io/badge/License-MIT-green.svg) ![Python versions](https://img.shields.io/pypi/pyversions/riptide-ffa.svg) [![Build Status](https://travis-ci.com/v-morello/riptide.svg?branch=master)](https://travis-ci.com/v-morello/riptide) [![codecov](https://codecov.io/gh/v-morello/riptide/branch/master/graph/badge.svg)](https://codecov.io/gh/v-morello/riptide)
1
+ [![arXiv](http://img.shields.io/badge/astro.ph-2004.03701-B31B1B.svg)](https://arxiv.org/abs/2004.03701) ![License](https://img.shields.io/badge/License-MIT-green.svg) ![Python versions](https://img.shields.io/pypi/pyversions/riptide-ffa.svg) ![CI status](https://github.com/v-morello/riptide/actions/workflows/CI.yml/badge.svg?branch=master) [![codecov](https://codecov.io/gh/v-morello/riptide/branch/master/graph/badge.svg)](https://codecov.io/gh/v-morello/riptide)
2
2
 
3
3
  # riptide
4
4
 
@@ -17,10 +17,10 @@ If using ``riptide`` contributes to a project that leads to a scientific publica
17
17
 
18
18
  The article covers the topic of the FFA's sensitivity in theory, here is a practical example on a faint source. Below is an L-band observation of [PSR J1932-3655](https://www.atnf.csiro.au/people/joh414/ppdata/1932-3655.html) from the [SUPERB survey](https://arxiv.org/abs/1706.04459), significantly offset from the true position of the source. The first plot was obtained by folding the observation using the known ephemeris of the pulsar with [PSRCHIVE](http://psrchive.sourceforge.net/). This is one of the faintest known pulsar instances identifiable in the survey.
19
19
 
20
- ![psrchive_plot](images/J1932-3655_psrchive_small.png "PSRCHIVE direct ephemeris folding")
20
+ ![psrchive_plot](docs/source/images/J1932-3655_psrchive_small.png "PSRCHIVE direct ephemeris folding")
21
21
 
22
22
  And below is a blind detection of the pulsar, running `riptide` on the same observation:
23
- ![riptide_plot](images/J1932-3655_blind_detection.png "riptide blind detection")
23
+ ![riptide_plot](docs/source/images/J1932-3655_blind_detection.png "riptide blind detection")
24
24
 
25
25
 
26
26
  ## Documentation
@@ -45,7 +45,7 @@ And then in the base directory of `riptide` run
45
45
  make install
46
46
  ```
47
47
 
48
- This simply runs ``pip install`` in [editable mode](https://pip.pypa.io/en/latest/reference/pip_install/#editable-installs), which means you can freely edit the code. It also installs any required dependencies with ``pip`` that are not present already. The installer also adds links to two command-line apps in your python environment using [console_scripts entry points](https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html):
48
+ This runs ``pip install`` in [editable mode](https://pip.pypa.io/en/latest/reference/pip_install/#editable-installs), which means you can freely edit the code. It also installs the development and documentation dependencies. The installer adds links to two command-line apps in your python environment using [console_scripts entry points](https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html):
49
49
 
50
50
  * `rffa`: The full end-to-end pipeline to search multiple DM trials, see below for details on how to use it.
51
51
  * `rseek`: A lightweight app to search a single time series and print significant candidates found, useful for quick data checks.
@@ -60,4 +60,3 @@ And you should see the full help of both applications.
60
60
 
61
61
 
62
62
 
63
-
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,58 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # This file only contains a selection of the most common options. For a full
4
+ # list see the documentation:
5
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
6
+
7
+ # -- Path setup --------------------------------------------------------------
8
+
9
+ # If extensions (or modules to document with autodoc) are in another directory,
10
+ # add these directories to sys.path here. If the directory is relative to the
11
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
12
+ #
13
+
14
+
15
+ # -- Project information -----------------------------------------------------
16
+
17
+ project = "riptide-ffa"
18
+ copyright = "2021, Vincent Morello"
19
+ author = "Vincent Morello"
20
+
21
+
22
+ # -- General configuration ---------------------------------------------------
23
+
24
+ # Add any Sphinx extension module names here, as strings. They can be
25
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
26
+ # ones.
27
+ # NOTE: sphinx.ext.autosectionlabel makes it easy to reference other
28
+ # sections in the docs
29
+ # See: https://stackoverflow.com/a/54843636
30
+ extensions = [
31
+ "sphinx.ext.autodoc",
32
+ "sphinx.ext.napoleon",
33
+ "sphinx_rtd_theme",
34
+ "sphinx.ext.autosectionlabel",
35
+ ]
36
+
37
+ # Add any paths that contain templates here, relative to this directory.
38
+ templates_path = ["_templates"]
39
+
40
+ # List of patterns, relative to source directory, that match files and
41
+ # directories to ignore when looking for source files.
42
+ # This pattern also affects html_static_path and html_extra_path.
43
+ exclude_patterns = []
44
+
45
+ nitpick_ignore = [
46
+ ("py:class", "ndarray"),
47
+ ("py:class", "optional"),
48
+ ]
49
+
50
+
51
+ # -- Options for HTML output -------------------------------------------------
52
+
53
+ # The theme to use for HTML and HTML Help pages. See the documentation for
54
+ # a list of builtin themes.
55
+ #
56
+ html_theme = "sphinx_rtd_theme"
57
+
58
+ pygments_style = "sphinx"
@@ -0,0 +1,18 @@
1
+ Docker Image
2
+ ============
3
+
4
+ The riptide `Dockerfile`_ is located in the ``docker`` subdirectory. To build the image, clone the repository and in its base directory type:
5
+
6
+ .. _`Dockerfile`: https://github.com/v-morello/riptide/blob/master/docker/Dockerfile
7
+
8
+ .. code-block:: console
9
+
10
+ make docker
11
+
12
+ Which builds an image named ``riptide-ffa``. Both python and ipython are installed within the docker image. To start a container:
13
+
14
+ .. code-block:: console
15
+
16
+ docker run -it --rm riptide-ffa
17
+
18
+ Feel free to adapt the Dockerfile to your needs. Refer to your favourite docker cheat sheet for further information.
@@ -0,0 +1,52 @@
1
+ riptide: Finding pulsars with the Fast Folding Algorithm (FFA)
2
+ ==============================================================
3
+
4
+ .. image:: http://img.shields.io/badge/astro.ph-2004.03701-B31B1B.svg
5
+ :target: https://arxiv.org/abs/2004.03701
6
+ :alt: arXiv
7
+
8
+ .. image:: https://github.com/v-morello/riptide/actions/workflows/CI.yml/badge.svg?branch=master
9
+ :alt: Build status
10
+
11
+ .. image:: https://codecov.io/gh/v-morello/riptide/branch/master/graph/badge.svg
12
+ :target: https://codecov.io/gh/v-morello/riptide
13
+ :alt: Coverage
14
+
15
+
16
+ ``riptide`` ("sea\ **r**\ ch\ **i**\ ng for **p**\ ulsars in the **ti**\ me **d**\ omain") is a pulsar searching
17
+ package that implements the Fast Folding Algorithm (FFA), the theoretically optimal search method
18
+ for periodic signals. Its interface is entirely in python while the core algorithms are implemented
19
+ in C++. riptide provides:
20
+
21
+ * A library of functions and classes to manipulate and search individual dedispersed time series
22
+ * A pipeline executable to process a set of DM trials and output a list of candidate files, plots and other data products
23
+
24
+
25
+ Citation
26
+ --------
27
+
28
+ If using ``riptide`` contributes to a project that leads to a scientific publication, please cite the article:
29
+ `Optimal periodicity searching: Revisiting the Fast Folding Algorithm for large scale pulsar surveys`__
30
+
31
+ __ https://arxiv.org/abs/2004.03701
32
+
33
+
34
+ .. toctree::
35
+ :maxdepth: 3
36
+ :caption: Contents:
37
+
38
+ installation
39
+ quickstart
40
+ kernfuncs
41
+ pipeline
42
+ docker
43
+ reference
44
+
45
+ Indices and tables
46
+ ------------------
47
+
48
+ * :ref:`genindex`
49
+ * :ref:`modindex`
50
+ * :ref:`search`
51
+
52
+
@@ -0,0 +1,31 @@
1
+ Installation
2
+ ============
3
+
4
+ The easiest method is to use pip install, which pulls the latest release from PyPI and installs all required dependencies:
5
+
6
+ .. code-block:: console
7
+
8
+ pip install riptide-ffa
9
+
10
+
11
+ Alternatively you can clone the repository and run ``make install``
12
+
13
+ .. code-block:: console
14
+
15
+ git clone https://github.com/v-morello/riptide
16
+ cd riptide/
17
+ make install
18
+
19
+ This runs ``pip install`` in `editable mode`_, which means you can freely edit the code.
20
+ It also installs the development and documentation dependencies. You can check that it all works
21
+ by running the test suite in a Python or IPython console:
22
+
23
+ >>> import riptide
24
+ >>> riptide.test()
25
+
26
+ .. _`editable mode`: https://pip.pypa.io/en/latest/reference/pip_install/#editable-installs
27
+
28
+ There should also now be two command-line apps in your python environment:
29
+
30
+ * ``rseek``: A lightweight app to search a single time series and print significant candidates found, useful for quick data checks. See :ref:`The rseek command-line app`.
31
+ * ``rffa``: The full end-to-end pipeline to search multiple DM trials, see :ref:`Using the Pipeline`.
@@ -0,0 +1,13 @@
1
+ FFA kernel functions
2
+ ====================
3
+
4
+ The python interface of ``riptide`` exposes some lower-level functions related to calculating the folding transform (interchangeably called FFA transform) of input data at some base integer period.
5
+ There is also a kernel function to calculate S/N. These are:
6
+
7
+ * ``ffa2``: FFA transform of a two-dimensional input that represents a pulse stack. The ``m`` lines of the input represent pulses in chronological order, and the ``p`` columns represent the phase dimension
8
+ * ``ffa1``: FFA transform of a one-dimensional input, that represents a time series. The function simply selects the largest number of entire pulses that fit in the data, reshapes them into a two-dimensional array, and calls ``ffa2()``
9
+ * ``ffafreq``: Returns the trial folding frequencies corresponding to every line in the output of an FFA transform
10
+ * ``ffaprd``: Same as ``ffafreq``, but returns trial periods instead
11
+ * ``boxcar_snr``: Compute the S/N ratio of pulse profile(s) by concolving them with a range of boxcar filters with different widths.
12
+
13
+ See :ref:`API Reference` for further details.