wdflow 1.3.0__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 (156) hide show
  1. wdflow-1.3.0/.github/workflows/ci.yml +102 -0
  2. wdflow-1.3.0/.github/workflows/pages.yml +36 -0
  3. wdflow-1.3.0/.github/workflows/publish.yml +74 -0
  4. wdflow-1.3.0/.github/workflows/tutorials.yml +32 -0
  5. wdflow-1.3.0/.gitignore +20 -0
  6. wdflow-1.3.0/.readthedocs.yaml +15 -0
  7. wdflow-1.3.0/CHANGELOG.md +473 -0
  8. wdflow-1.3.0/CITATION.cff +106 -0
  9. wdflow-1.3.0/CONTRIBUTING.md +98 -0
  10. wdflow-1.3.0/Dockerfile +45 -0
  11. wdflow-1.3.0/LICENSE +674 -0
  12. wdflow-1.3.0/PKG-INFO +351 -0
  13. wdflow-1.3.0/README.md +284 -0
  14. wdflow-1.3.0/conda-recipe/meta.yaml +50 -0
  15. wdflow-1.3.0/docs/api.rst +346 -0
  16. wdflow-1.3.0/docs/conf.py +58 -0
  17. wdflow-1.3.0/docs/design/event-candidates.md +135 -0
  18. wdflow-1.3.0/docs/design/sky-localisation.md +117 -0
  19. wdflow-1.3.0/docs/design/sparse-coefficients.md +41 -0
  20. wdflow-1.3.0/docs/design/warm-up.md +76 -0
  21. wdflow-1.3.0/docs/design/whitening.md +99 -0
  22. wdflow-1.3.0/docs/design/windows-and-graphs.md +349 -0
  23. wdflow-1.3.0/docs/index.md +27 -0
  24. wdflow-1.3.0/docs/logo.svg +21 -0
  25. wdflow-1.3.0/docs/requirements.txt +4 -0
  26. wdflow-1.3.0/docs/tutorials/01_the_statistic_and_the_parameters.ipynb +419 -0
  27. wdflow-1.3.0/docs/tutorials/02_the_wavegram_and_long_signals.ipynb +402 -0
  28. wdflow-1.3.0/docs/tutorials/03_coincidence_and_significance.ipynb +575 -0
  29. wdflow-1.3.0/docs/tutorials/04_reconstruction_and_phase.ipynb +966 -0
  30. wdflow-1.3.0/examples/zero_phase_whitening_example.py +102 -0
  31. wdflow-1.3.0/pyproject.toml +62 -0
  32. wdflow-1.3.0/site/figures/detector_stage_graph.png +0 -0
  33. wdflow-1.3.0/site/figures/detector_stage_graph.py +182 -0
  34. wdflow-1.3.0/site/figures/network_coincidence.png +0 -0
  35. wdflow-1.3.0/site/figures/wavegram_assembled.png +0 -0
  36. wdflow-1.3.0/site/index.html +888 -0
  37. wdflow-1.3.0/site/logo.svg +22 -0
  38. wdflow-1.3.0/site/sitemap.xml +9 -0
  39. wdflow-1.3.0/tests/_synth.py +105 -0
  40. wdflow-1.3.0/tests/conftest.py +78 -0
  41. wdflow-1.3.0/tests/fixtures/golden_triggers.parquet +0 -0
  42. wdflow-1.3.0/tests/fixtures/golden_triggers_block.parquet +0 -0
  43. wdflow-1.3.0/tests/fixtures/make_sosfiltfilt_reference.py +27 -0
  44. wdflow-1.3.0/tests/fixtures/sosfiltfilt_scipy117.npz +0 -0
  45. wdflow-1.3.0/tests/fixtures/test_noise.gwf +0 -0
  46. wdflow-1.3.0/tests/test_anomaly.py +145 -0
  47. wdflow-1.3.0/tests/test_background_accumulator.py +81 -0
  48. wdflow-1.3.0/tests/test_background_glitches.py +100 -0
  49. wdflow-1.3.0/tests/test_bandpass_downsampling.py +199 -0
  50. wdflow-1.3.0/tests/test_baseline.py +94 -0
  51. wdflow-1.3.0/tests/test_cluster_coefficients.py +217 -0
  52. wdflow-1.3.0/tests/test_clustering.py +101 -0
  53. wdflow-1.3.0/tests/test_coefficients.py +176 -0
  54. wdflow-1.3.0/tests/test_coincidence.py +87 -0
  55. wdflow-1.3.0/tests/test_detector_edge_scorer.py +94 -0
  56. wdflow-1.3.0/tests/test_detector_graph.py +542 -0
  57. wdflow-1.3.0/tests/test_evaluation.py +121 -0
  58. wdflow-1.3.0/tests/test_event_significance.py +116 -0
  59. wdflow-1.3.0/tests/test_event_store.py +100 -0
  60. wdflow-1.3.0/tests/test_filtering.py +49 -0
  61. wdflow-1.3.0/tests/test_gnn.py +595 -0
  62. wdflow-1.3.0/tests/test_golden_output.py +141 -0
  63. wdflow-1.3.0/tests/test_injections.py +208 -0
  64. wdflow-1.3.0/tests/test_io.py +116 -0
  65. wdflow-1.3.0/tests/test_local_scale.py +75 -0
  66. wdflow-1.3.0/tests/test_metaparameters.py +319 -0
  67. wdflow-1.3.0/tests/test_mock_dataset.py +403 -0
  68. wdflow-1.3.0/tests/test_modes.py +84 -0
  69. wdflow-1.3.0/tests/test_network_graph.py +718 -0
  70. wdflow-1.3.0/tests/test_network_statistic.py +89 -0
  71. wdflow-1.3.0/tests/test_pairs.py +94 -0
  72. wdflow-1.3.0/tests/test_plots.py +152 -0
  73. wdflow-1.3.0/tests/test_reconstruction.py +270 -0
  74. wdflow-1.3.0/tests/test_report.py +99 -0
  75. wdflow-1.3.0/tests/test_ridge.py +90 -0
  76. wdflow-1.3.0/tests/test_robust_events.py +464 -0
  77. wdflow-1.3.0/tests/test_roc.py +25 -0
  78. wdflow-1.3.0/tests/test_scale.py +127 -0
  79. wdflow-1.3.0/tests/test_significance.py +150 -0
  80. wdflow-1.3.0/tests/test_skymap.py +106 -0
  81. wdflow-1.3.0/tests/test_submission.py +139 -0
  82. wdflow-1.3.0/tests/test_timing.py +185 -0
  83. wdflow-1.3.0/tests/test_timing_prior.py +58 -0
  84. wdflow-1.3.0/tests/test_wavegram_event.py +223 -0
  85. wdflow-1.3.0/tests/test_wavegram_match_profile.py +229 -0
  86. wdflow-1.3.0/tests/test_wavegram_render.py +43 -0
  87. wdflow-1.3.0/tests/test_wavelet_pixel_clustering.py +117 -0
  88. wdflow-1.3.0/tests/test_wavelets.py +189 -0
  89. wdflow-1.3.0/tests/test_whitening_persistence.py +107 -0
  90. wdflow-1.3.0/tests/test_window_boundary_invariance.py +116 -0
  91. wdflow-1.3.0/tests/test_zero_phase_whitening.py +143 -0
  92. wdflow-1.3.0/wdf/__init__.py +0 -0
  93. wdflow-1.3.0/wdf/analysis/__init__.py +116 -0
  94. wdflow-1.3.0/wdf/analysis/anomaly.py +266 -0
  95. wdflow-1.3.0/wdf/analysis/background.py +195 -0
  96. wdflow-1.3.0/wdf/analysis/baseline.py +147 -0
  97. wdflow-1.3.0/wdf/analysis/cluster_coefficients.py +391 -0
  98. wdflow-1.3.0/wdf/analysis/clustering.py +479 -0
  99. wdflow-1.3.0/wdf/analysis/coefficients.py +337 -0
  100. wdflow-1.3.0/wdf/analysis/coincidence.py +252 -0
  101. wdflow-1.3.0/wdf/analysis/detector_graph.py +1519 -0
  102. wdflow-1.3.0/wdf/analysis/detectors.py +52 -0
  103. wdflow-1.3.0/wdf/analysis/evaluation.py +183 -0
  104. wdflow-1.3.0/wdf/analysis/event_significance.py +437 -0
  105. wdflow-1.3.0/wdf/analysis/event_store.py +181 -0
  106. wdflow-1.3.0/wdf/analysis/gnn.py +550 -0
  107. wdflow-1.3.0/wdf/analysis/injections.py +247 -0
  108. wdflow-1.3.0/wdf/analysis/io.py +259 -0
  109. wdflow-1.3.0/wdf/analysis/metaparameters.py +177 -0
  110. wdflow-1.3.0/wdf/analysis/modes.py +163 -0
  111. wdflow-1.3.0/wdf/analysis/network_graph.py +916 -0
  112. wdflow-1.3.0/wdf/analysis/network_statistic.py +212 -0
  113. wdflow-1.3.0/wdf/analysis/output_schema.py +37 -0
  114. wdflow-1.3.0/wdf/analysis/pairs.py +220 -0
  115. wdflow-1.3.0/wdf/analysis/pixel_graph.py +513 -0
  116. wdflow-1.3.0/wdf/analysis/plots.py +309 -0
  117. wdflow-1.3.0/wdf/analysis/reconstruction.py +426 -0
  118. wdflow-1.3.0/wdf/analysis/report.py +222 -0
  119. wdflow-1.3.0/wdf/analysis/review_report.py +261 -0
  120. wdflow-1.3.0/wdf/analysis/ridge.py +177 -0
  121. wdflow-1.3.0/wdf/analysis/robust_events.py +1185 -0
  122. wdflow-1.3.0/wdf/analysis/roc.py +88 -0
  123. wdflow-1.3.0/wdf/analysis/scale.py +383 -0
  124. wdflow-1.3.0/wdf/analysis/significance.py +258 -0
  125. wdflow-1.3.0/wdf/analysis/skymap.py +215 -0
  126. wdflow-1.3.0/wdf/analysis/submission.py +233 -0
  127. wdflow-1.3.0/wdf/analysis/timing.py +295 -0
  128. wdflow-1.3.0/wdf/analysis/timing_prior.py +126 -0
  129. wdflow-1.3.0/wdf/analysis/wavegram_match.py +693 -0
  130. wdflow-1.3.0/wdf/analysis/wavelets.py +255 -0
  131. wdflow-1.3.0/wdf/config/Parameters.py +113 -0
  132. wdflow-1.3.0/wdf/config/__init__.py +0 -0
  133. wdflow-1.3.0/wdf/filtering.py +71 -0
  134. wdflow-1.3.0/wdf/mock/__init__.py +12 -0
  135. wdflow-1.3.0/wdf/mock/dataset.py +1280 -0
  136. wdflow-1.3.0/wdf/mock/noise.py +57 -0
  137. wdflow-1.3.0/wdf/mock/real_data.py +218 -0
  138. wdflow-1.3.0/wdf/mock/waveforms.py +318 -0
  139. wdflow-1.3.0/wdf/observers/ParameterEstimationObserver.py +67 -0
  140. wdflow-1.3.0/wdf/observers/SingleEventPrintFileObserver.py +70 -0
  141. wdflow-1.3.0/wdf/observers/__init__.py +0 -0
  142. wdflow-1.3.0/wdf/observers/observable.py +62 -0
  143. wdflow-1.3.0/wdf/observers/observer.py +22 -0
  144. wdflow-1.3.0/wdf/processes/BandPassDownSampling.py +251 -0
  145. wdflow-1.3.0/wdf/processes/Coloring.py +58 -0
  146. wdflow-1.3.0/wdf/processes/DWhitening.py +132 -0
  147. wdflow-1.3.0/wdf/processes/Whitening.py +116 -0
  148. wdflow-1.3.0/wdf/processes/__init__.py +0 -0
  149. wdflow-1.3.0/wdf/processes/ar_lv_io.py +106 -0
  150. wdflow-1.3.0/wdf/processes/wavelet_energy.py +32 -0
  151. wdflow-1.3.0/wdf/processes/wdf.py +82 -0
  152. wdflow-1.3.0/wdf/processes/wdfUnitDSWorker.py +334 -0
  153. wdflow-1.3.0/wdf/processes/zero_phase_whitening.py +248 -0
  154. wdflow-1.3.0/wdf/structures/__init__.py +0 -0
  155. wdflow-1.3.0/wdf/structures/array2SeqView.py +111 -0
  156. wdflow-1.3.0/wdf/structures/eventPE.py +99 -0
@@ -0,0 +1,102 @@
1
+ name: CI
2
+
3
+ # Every pull request into master must pass this before it can be merged. The
4
+ # branch-protection rule that enforces it names the job below as a required
5
+ # status check -- see CONTRIBUTING.md.
6
+
7
+ on:
8
+ push:
9
+ branches: [master]
10
+ pull_request:
11
+ branches: [master]
12
+ workflow_dispatch:
13
+
14
+ jobs:
15
+ # The analysis layer works on saved trigger files and needs nothing compiled:
16
+ # this job installs without the `pipeline` group, so it also checks that
17
+ # wdf.analysis still runs without py4tsa.
18
+ analysis:
19
+ name: Analysis layer (Python ${{ matrix.python-version }})
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ python-version: ["3.10", "3.11", "3.12"]
25
+ steps:
26
+ - uses: actions/checkout@v5
27
+
28
+ - uses: actions/setup-python@v5
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+ cache: pip
32
+
33
+ - name: Install
34
+ run: pip install -e ".[dev]"
35
+
36
+ # test_golden_output, test_reconstruction and test_zero_phase_whitening
37
+ # drive the real trigger generation and so need py4tsa; test_gnn needs
38
+ # torch_geometric and test_mock_dataset needs pycbc. The `pipeline` job
39
+ # below covers the first three.
40
+ - name: Run the tests that need no compiled core
41
+ run: |
42
+ pytest tests -v \
43
+ --ignore=tests/test_golden_output.py \
44
+ --ignore=tests/test_reconstruction.py \
45
+ --ignore=tests/test_zero_phase_whitening.py \
46
+ --ignore=tests/test_gnn.py \
47
+ --ignore=tests/test_mock_dataset.py
48
+
49
+ # The full suite, trigger generation included, with the compiled core from
50
+ # PyPI. Python 3.12, so that the newest scipy is what the golden outputs are
51
+ # held against: older Pythons pin older scipy.
52
+ pipeline:
53
+ name: Full suite
54
+ runs-on: ubuntu-latest
55
+ steps:
56
+ - uses: actions/checkout@v5
57
+
58
+ - uses: actions/setup-python@v5
59
+ with:
60
+ python-version: "3.12"
61
+ cache: pip
62
+
63
+ - name: Install
64
+ run: pip install -e ".[pipeline,dev]"
65
+
66
+ - name: Import smoke test
67
+ run: python -c "import py4tsa, wdf; print(py4tsa.__file__); print(wdf.__file__)"
68
+
69
+ # test_gnn needs torch_geometric and test_mock_dataset needs pycbc;
70
+ # both are heavy for a gate that already covers the pipeline end to end.
71
+ - name: Run the full suite
72
+ run: |
73
+ pytest tests -v \
74
+ --ignore=tests/test_gnn.py \
75
+ --ignore=tests/test_mock_dataset.py
76
+
77
+ docs:
78
+ name: Docs build check
79
+ runs-on: ubuntu-latest
80
+ steps:
81
+ - uses: actions/checkout@v5
82
+
83
+ - uses: actions/setup-python@v5
84
+ with:
85
+ python-version: "3.12"
86
+ cache: pip
87
+
88
+ # The same two steps .readthedocs.yaml performs. autodoc imports every
89
+ # module it documents, so the package and its runtime dependencies have
90
+ # to be here: conf.py mocks only the compiled and optional imports, and
91
+ # without the rest every autodoc directive fails and -W fails the build.
92
+ - name: Install docs requirements
93
+ run: |
94
+ pip install -r docs/requirements.txt
95
+ pip install -e .
96
+
97
+ # -W: autodoc mocks the compiled and optional imports (see docs/conf.py),
98
+ # and the tutorials are rendered from their committed outputs rather than
99
+ # executed, so a warning here is a real defect rather than a missing
100
+ # dependency.
101
+ - name: Build the docs
102
+ run: sphinx-build -W --keep-going -b html docs docs/_build/html
@@ -0,0 +1,36 @@
1
+ name: pages
2
+
3
+ # Publishes site/ to GitHub Pages. The Sphinx API reference is built separately
4
+ # by Read the Docs; this is the project's landing page and links out to it.
5
+
6
+ on:
7
+ push:
8
+ branches: [master]
9
+ paths:
10
+ - "site/**"
11
+ - ".github/workflows/pages.yml"
12
+ workflow_dispatch:
13
+
14
+ permissions:
15
+ contents: read
16
+ pages: write
17
+ id-token: write
18
+
19
+ concurrency:
20
+ group: pages
21
+ cancel-in-progress: true
22
+
23
+ jobs:
24
+ deploy:
25
+ runs-on: ubuntu-latest
26
+ environment:
27
+ name: github-pages
28
+ url: ${{ steps.deployment.outputs.page_url }}
29
+ steps:
30
+ - uses: actions/checkout@v5
31
+ - uses: actions/configure-pages@v5
32
+ - uses: actions/upload-pages-artifact@v3
33
+ with:
34
+ path: site
35
+ - id: deployment
36
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,74 @@
1
+ name: publish
2
+
3
+ # Builds the sdist and the wheel and puts them on PyPI. wdflow is pure Python,
4
+ # so one wheel serves every platform; the compiled core it depends on,
5
+ # py4tsa, publishes its own from p4TSA.
6
+
7
+ on:
8
+ release:
9
+ types: [published]
10
+ workflow_dispatch:
11
+ inputs:
12
+ publish:
13
+ description: "Publish to PyPI when the build passes"
14
+ type: boolean
15
+ default: false
16
+
17
+ jobs:
18
+ build:
19
+ name: Build
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v5
23
+ - uses: actions/setup-python@v5
24
+ with:
25
+ python-version: "3.12"
26
+ - run: pipx run build
27
+ - uses: actions/upload-artifact@v4
28
+ with:
29
+ name: dist
30
+ path: dist/*
31
+
32
+ # The wheel installed where it will be used, with the compiled core from the
33
+ # index, and the suite run against it.
34
+ verify:
35
+ name: Install the wheel and run the suite
36
+ needs: build
37
+ runs-on: ubuntu-latest
38
+ steps:
39
+ - uses: actions/checkout@v5
40
+ - uses: actions/setup-python@v5
41
+ with:
42
+ python-version: "3.12"
43
+ - uses: actions/download-artifact@v4
44
+ with:
45
+ name: dist
46
+ path: dist
47
+
48
+ - name: Install it
49
+ run: |
50
+ pip install "$(ls dist/*.whl)[pipeline]" pytest
51
+ python -c "import py4tsa, wdf.analysis, wdf.processes.wdfUnitDSWorker"
52
+
53
+ - name: Run the suite against the installed package
54
+ run: |
55
+ pytest tests -q \
56
+ --ignore=tests/test_gnn.py \
57
+ --ignore=tests/test_mock_dataset.py
58
+
59
+ # An upload cannot be taken back, so the `pypi` environment holds the run
60
+ # for a human whatever triggered it.
61
+ publish:
62
+ name: Publish
63
+ needs: [build, verify]
64
+ if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.publish)
65
+ runs-on: ubuntu-latest
66
+ environment: pypi
67
+ permissions:
68
+ id-token: write # trusted publishing; no token is stored here
69
+ steps:
70
+ - uses: actions/download-artifact@v4
71
+ with:
72
+ name: dist
73
+ path: dist
74
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,32 @@
1
+ name: tutorials
2
+
3
+ # Executes the notebooks: the docs render them from their committed outputs,
4
+ # so nothing else runs them. Weekly rather than per push: what breaks a
5
+ # notebook is usually a change elsewhere.
6
+
7
+ on:
8
+ schedule:
9
+ - cron: "0 6 * * 1"
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ run:
14
+ name: Execute the tutorials
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v5
18
+
19
+ - uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+ cache: pip
23
+
24
+ - name: Install wdflow
25
+ run: pip install -e ".[pipeline,tutorials,mock]"
26
+
27
+ # No --allow-errors, so a cell that raises fails the run; no --inplace,
28
+ # so the committed outputs are left alone.
29
+ - name: Execute every notebook
30
+ env:
31
+ MPLBACKEND: Agg
32
+ run: jupyter execute --timeout=900 tutorials/*.ipynb
@@ -0,0 +1,20 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+ .ipynb_checkpoints/
7
+ .pytest_cache/
8
+ docs/_build/
9
+ *.bak
10
+
11
+ # Built artefact, regenerated from the package.
12
+ wdflow.tar.tgz
13
+
14
+ # Local assistant configuration, not part of the project.
15
+ CLAUDE.md
16
+ AGENTS.md
17
+ .claude/
18
+
19
+ # Internal planning, not part of the released project.
20
+ ROADMAP.md
@@ -0,0 +1,15 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-24.04
5
+ tools:
6
+ python: "3.12"
7
+
8
+ sphinx:
9
+ configuration: docs/conf.py
10
+
11
+ python:
12
+ install:
13
+ - requirements: docs/requirements.txt
14
+ - method: pip
15
+ path: .