jaxtfwaves 0.2.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 (32) hide show
  1. jaxtfwaves-0.2.0/.gitattributes +1 -0
  2. jaxtfwaves-0.2.0/.gitignore +202 -0
  3. jaxtfwaves-0.2.0/.gitlab-ci.yml +40 -0
  4. jaxtfwaves-0.2.0/.pre-commit-config.yaml +7 -0
  5. jaxtfwaves-0.2.0/PKG-INFO +144 -0
  6. jaxtfwaves-0.2.0/README.md +124 -0
  7. jaxtfwaves-0.2.0/notebooks/EMRI.ipynb +1268 -0
  8. jaxtfwaves-0.2.0/notebooks/emri-example-2.ipynb +1339 -0
  9. jaxtfwaves-0.2.0/notebooks/emri-example-tdi.ipynb +2369 -0
  10. jaxtfwaves-0.2.0/notebooks/emri-example.ipynb +1708 -0
  11. jaxtfwaves-0.2.0/notebooks/fd-linear-chirp_example.ipynb +467 -0
  12. jaxtfwaves-0.2.0/notebooks/linear-chirp-example-multiple-modes.ipynb +788 -0
  13. jaxtfwaves-0.2.0/notebooks/linear-chirp-example-tdi.ipynb +1785 -0
  14. jaxtfwaves-0.2.0/notebooks/linear-chirp-example.ipynb +745 -0
  15. jaxtfwaves-0.2.0/notebooks/sobhb-example-ripple.ipynb +1997 -0
  16. jaxtfwaves-0.2.0/notebooks/sobhb-example.ipynb +1171 -0
  17. jaxtfwaves-0.2.0/pyproject.toml +59 -0
  18. jaxtfwaves-0.2.0/src/tfplugins/__init__.py +0 -0
  19. jaxtfwaves-0.2.0/src/tfplugins/sobhbwaveform/__init__.py +0 -0
  20. jaxtfwaves-0.2.0/src/tfplugins/sobhbwaveform/sobhbparams.py +758 -0
  21. jaxtfwaves-0.2.0/src/tfplugins/sobhbwaveform/sobhbwaveform_ripple.py +474 -0
  22. jaxtfwaves-0.2.0/src/tfwaves/__init__.py +9 -0
  23. jaxtfwaves-0.2.0/src/tfwaves/interpolation.py +265 -0
  24. jaxtfwaves-0.2.0/src/tfwaves/response.py +633 -0
  25. jaxtfwaves-0.2.0/src/tfwaves/stft.py +902 -0
  26. jaxtfwaves-0.2.0/src/tfwaves/utils.py +705 -0
  27. jaxtfwaves-0.2.0/src/tfwaves/waveform.py +369 -0
  28. jaxtfwaves-0.2.0/tests/__init__.py +1 -0
  29. jaxtfwaves-0.2.0/tests/orbits.h5 +0 -0
  30. jaxtfwaves-0.2.0/tests/test_stft.py +192 -0
  31. jaxtfwaves-0.2.0/tests/test_waveform.py +13 -0
  32. jaxtfwaves-0.2.0/uv.lock +2038 -0
@@ -0,0 +1 @@
1
+ tests/orbits.h5 filter=lfs diff=lfs merge=lfs -text
@@ -0,0 +1,202 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+ *.pyc
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py.cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # UV
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ #uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ #poetry.lock
110
+ #poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ #pdm.lock
115
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
116
+ # in version control.
117
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
118
+ .pdm.toml
119
+ .pdm-python
120
+ .pdm-build/
121
+
122
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
123
+ __pypackages__/
124
+
125
+ # Celery stuff
126
+ celerybeat-schedule
127
+ celerybeat.pid
128
+
129
+ # SageMath parsed files
130
+ *.sage.py
131
+
132
+ # Environments
133
+ .env
134
+ .envrc
135
+ .venv
136
+ env/
137
+ venv/
138
+ ENV/
139
+ env.bak/
140
+ venv.bak/
141
+
142
+ # Spyder project settings
143
+ .spyderproject
144
+ .spyproject
145
+
146
+ # Rope project settings
147
+ .ropeproject
148
+
149
+ # mkdocs documentation
150
+ /site
151
+
152
+ # mypy
153
+ .mypy_cache/
154
+ .dmypy.json
155
+ dmypy.json
156
+
157
+ # Pyre type checker
158
+ .pyre/
159
+
160
+ # pytype static type analyzer
161
+ .pytype/
162
+
163
+ # Cython debug symbols
164
+ cython_debug/
165
+
166
+ # PyCharm
167
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
168
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
169
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
170
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
171
+ #.idea/
172
+
173
+ # Abstra
174
+ # Abstra is an AI-powered process automation framework.
175
+ # Ignore directories containing user credentials, local state, and settings.
176
+ # Learn more at https://abstra.io/docs
177
+ .abstra/
178
+
179
+ # Visual Studio Code
180
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
181
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
182
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
183
+ # you could uncomment the following to ignore the entire vscode folder
184
+ # .vscode/
185
+
186
+ # Ruff stuff:
187
+ .ruff_cache/
188
+
189
+ # PyPI configuration file
190
+ .pypirc
191
+
192
+ # Cursor
193
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
194
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
195
+ # refer to https://docs.cursor.com/context/ignore-files
196
+ .cursorignore
197
+ .cursorindexingignore
198
+
199
+ # Marimo
200
+ marimo/_static/
201
+ marimo/_lsp/
202
+ __marimo__/
@@ -0,0 +1,40 @@
1
+ image: python:3.13
2
+
3
+ stages:
4
+ - test
5
+ - build
6
+
7
+ before_script:
8
+ - apt-get update
9
+ - apt-get install -y git-lfs curl
10
+ - git lfs install
11
+ - git lfs fetch --all
12
+ - git lfs checkout
13
+ - pip install --upgrade pip
14
+ - curl -LsSf https://astral.sh/uv/install.sh | sh
15
+ - export PATH="$HOME/.local/bin:$PATH"
16
+ - uv sync --all-extras --group dev
17
+
18
+ # Run unit tests and generate report on supported Python versions
19
+ pytest:
20
+ stage: test
21
+ script:
22
+ - uv run pytest -v
23
+ artifacts:
24
+ when: always
25
+ paths:
26
+ - report.xml
27
+ - coverage.xml
28
+
29
+ # Lint and format checks
30
+ ruff:
31
+ stage: test
32
+ script:
33
+ - uv run ruff check src tests
34
+ - uv run ruff format --check src tests
35
+
36
+ # Build package
37
+ package:
38
+ stage: build
39
+ script:
40
+ - uv build
@@ -0,0 +1,7 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.6.8
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
@@ -0,0 +1,144 @@
1
+ Metadata-Version: 2.4
2
+ Name: jaxtfwaves
3
+ Version: 0.2.0
4
+ Summary: Fast time-frequency gravitational-wave response package for LISA data analysis with a JAX backend
5
+ Author-email: Quentin Baghi <quentin.baghi@protonmail.com>, Gael Servignat <servignat@apc.in2p3.fr>, Saptarshi Ghosh <saptarshi.ghosh@apc.in2p3.fr>
6
+ Requires-Python: <3.14,>=3.11
7
+ Requires-Dist: flax==0.12.0
8
+ Requires-Dist: h5py<4.0.0,>=3.14.0
9
+ Requires-Dist: jax==0.9.2
10
+ Requires-Dist: jaxlib==0.9.2
11
+ Requires-Dist: lisaconstants<3.0.0,>=2.0.1
12
+ Requires-Dist: matplotlib
13
+ Requires-Dist: numpy
14
+ Requires-Dist: scipy
15
+ Provides-Extra: plugins
16
+ Requires-Dist: ripplegw<0.0.10,>=0.0.9; extra == 'plugins'
17
+ Provides-Extra: sobhbwaveform
18
+ Requires-Dist: ripplegw<0.0.10,>=0.0.9; extra == 'sobhbwaveform'
19
+ Description-Content-Type: text/markdown
20
+
21
+ # jaxtfwaves
22
+ JAXTFwaves is the sibling project of [tfwaves](https://gitlab.in2p3.fr/lisa-apc/tfwaves) that is using JAX as backend.
23
+
24
+ # tfwaves
25
+ TFWaves is a python package to compute fast time-frequency gravitational-wave response for LISA data analysis. It takes as imput phase and amplitude functions of the gravitational strain in the pseudo-inertial solar system barycenter frame, and outputs time-delay interferometry responses in the time-frequency domain.
26
+
27
+ ## Installation
28
+
29
+ The core package is available on PyPI:
30
+
31
+ ```bash
32
+ pip install jaxtfwaves
33
+ ```
34
+
35
+ To install a specific plugin, use its named extra:
36
+
37
+ ```bash
38
+ pip install "jaxtfwaves[sobhbwaveform]" # SOBHB waveforms via ripplegw
39
+ # pip install "jaxtfwaves[emriwaveform]" # EMRI waveforms (coming soon)
40
+ ```
41
+
42
+ Or install all available plugins at once:
43
+
44
+ ```bash
45
+ pip install "jaxtfwaves[plugins]"
46
+ ```
47
+
48
+ ## Contributing
49
+
50
+ ### Development environment
51
+
52
+ We use [uv](https://docs.astral.sh/uv/) for dependency management.
53
+ First clone the repository on your machine and go in the directory:
54
+
55
+ ```bash
56
+ git clone git@gitlab.in2p3.fr:lisa-apc/tfwaves.git
57
+ cd jaxtfwaves
58
+ ```
59
+
60
+ Create the lockfile and synchronize dependencies (including development tools):
61
+
62
+ ```bash
63
+ uv sync --all-extras --group dev
64
+ ```
65
+
66
+ We recommend you install pre-commit hooks to detect errors before you even
67
+ commit.
68
+
69
+ ```bash
70
+ uv run pre-commit install
71
+ ```
72
+
73
+ Then you can run any script using
74
+
75
+ ```bash
76
+ uv run python your_script.py
77
+ ```
78
+
79
+ Lint and format checks are handled with Ruff:
80
+
81
+ ```bash
82
+ uv run ruff check src tests
83
+ uv run ruff format --check src tests
84
+ ```
85
+
86
+ Alternatively, you can activate the virtual environment by running
87
+
88
+ ```bash
89
+ source .venv/bin/activate
90
+ ```
91
+ and deactivate it by just running
92
+
93
+ ```bash
94
+ deactivate
95
+ ```
96
+
97
+ ### Alternative local installation
98
+
99
+ As an alternative to uv-managed environments, you can install the package in development mode when you are in the `jaxtfwaves` directory:
100
+
101
+ ```bash
102
+ pip install -e . # core only
103
+ pip install -e ".[plugins]" # core + plugins
104
+ ```
105
+
106
+ ## Publishing to PyPI
107
+
108
+ 1. **Build** the package (from the repo root):
109
+
110
+ ```bash
111
+ uv build
112
+ ```
113
+
114
+ 2. **Check** the artifacts:
115
+
116
+ ```bash
117
+ uv run twine check dist/*
118
+ ```
119
+
120
+ 3. **Upload to TestPyPI** first:
121
+
122
+ ```bash
123
+ uv publish --publish-url https://test.pypi.org/legacy/ --token pypi-YOUR_TEST_TOKEN
124
+ ```
125
+
126
+ Verify the install:
127
+
128
+ ```bash
129
+ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple jaxtfwaves
130
+ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "jaxtfwaves[plugins]"
131
+ ```
132
+
133
+ 4. **Upload to PyPI**:
134
+
135
+ ```bash
136
+ uv publish --token pypi-YOUR_TOKEN
137
+ ```
138
+
139
+ 5. **Tag the release**:
140
+
141
+ ```bash
142
+ git tag v0.1.0
143
+ git push origin v0.1.0
144
+ ```
@@ -0,0 +1,124 @@
1
+ # jaxtfwaves
2
+ JAXTFwaves is the sibling project of [tfwaves](https://gitlab.in2p3.fr/lisa-apc/tfwaves) that is using JAX as backend.
3
+
4
+ # tfwaves
5
+ TFWaves is a python package to compute fast time-frequency gravitational-wave response for LISA data analysis. It takes as imput phase and amplitude functions of the gravitational strain in the pseudo-inertial solar system barycenter frame, and outputs time-delay interferometry responses in the time-frequency domain.
6
+
7
+ ## Installation
8
+
9
+ The core package is available on PyPI:
10
+
11
+ ```bash
12
+ pip install jaxtfwaves
13
+ ```
14
+
15
+ To install a specific plugin, use its named extra:
16
+
17
+ ```bash
18
+ pip install "jaxtfwaves[sobhbwaveform]" # SOBHB waveforms via ripplegw
19
+ # pip install "jaxtfwaves[emriwaveform]" # EMRI waveforms (coming soon)
20
+ ```
21
+
22
+ Or install all available plugins at once:
23
+
24
+ ```bash
25
+ pip install "jaxtfwaves[plugins]"
26
+ ```
27
+
28
+ ## Contributing
29
+
30
+ ### Development environment
31
+
32
+ We use [uv](https://docs.astral.sh/uv/) for dependency management.
33
+ First clone the repository on your machine and go in the directory:
34
+
35
+ ```bash
36
+ git clone git@gitlab.in2p3.fr:lisa-apc/tfwaves.git
37
+ cd jaxtfwaves
38
+ ```
39
+
40
+ Create the lockfile and synchronize dependencies (including development tools):
41
+
42
+ ```bash
43
+ uv sync --all-extras --group dev
44
+ ```
45
+
46
+ We recommend you install pre-commit hooks to detect errors before you even
47
+ commit.
48
+
49
+ ```bash
50
+ uv run pre-commit install
51
+ ```
52
+
53
+ Then you can run any script using
54
+
55
+ ```bash
56
+ uv run python your_script.py
57
+ ```
58
+
59
+ Lint and format checks are handled with Ruff:
60
+
61
+ ```bash
62
+ uv run ruff check src tests
63
+ uv run ruff format --check src tests
64
+ ```
65
+
66
+ Alternatively, you can activate the virtual environment by running
67
+
68
+ ```bash
69
+ source .venv/bin/activate
70
+ ```
71
+ and deactivate it by just running
72
+
73
+ ```bash
74
+ deactivate
75
+ ```
76
+
77
+ ### Alternative local installation
78
+
79
+ As an alternative to uv-managed environments, you can install the package in development mode when you are in the `jaxtfwaves` directory:
80
+
81
+ ```bash
82
+ pip install -e . # core only
83
+ pip install -e ".[plugins]" # core + plugins
84
+ ```
85
+
86
+ ## Publishing to PyPI
87
+
88
+ 1. **Build** the package (from the repo root):
89
+
90
+ ```bash
91
+ uv build
92
+ ```
93
+
94
+ 2. **Check** the artifacts:
95
+
96
+ ```bash
97
+ uv run twine check dist/*
98
+ ```
99
+
100
+ 3. **Upload to TestPyPI** first:
101
+
102
+ ```bash
103
+ uv publish --publish-url https://test.pypi.org/legacy/ --token pypi-YOUR_TEST_TOKEN
104
+ ```
105
+
106
+ Verify the install:
107
+
108
+ ```bash
109
+ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple jaxtfwaves
110
+ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "jaxtfwaves[plugins]"
111
+ ```
112
+
113
+ 4. **Upload to PyPI**:
114
+
115
+ ```bash
116
+ uv publish --token pypi-YOUR_TOKEN
117
+ ```
118
+
119
+ 5. **Tag the release**:
120
+
121
+ ```bash
122
+ git tag v0.1.0
123
+ git push origin v0.1.0
124
+ ```