Metadata-Version: 2.4
Name: jaxtfwaves
Version: 0.2.0
Summary: Fast time-frequency gravitational-wave response package for LISA data analysis with a JAX backend
Author-email: Quentin Baghi <quentin.baghi@protonmail.com>, Gael Servignat <servignat@apc.in2p3.fr>, Saptarshi Ghosh <saptarshi.ghosh@apc.in2p3.fr>
Requires-Python: <3.14,>=3.11
Requires-Dist: flax==0.12.0
Requires-Dist: h5py<4.0.0,>=3.14.0
Requires-Dist: jax==0.9.2
Requires-Dist: jaxlib==0.9.2
Requires-Dist: lisaconstants<3.0.0,>=2.0.1
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: scipy
Provides-Extra: plugins
Requires-Dist: ripplegw<0.0.10,>=0.0.9; extra == 'plugins'
Provides-Extra: sobhbwaveform
Requires-Dist: ripplegw<0.0.10,>=0.0.9; extra == 'sobhbwaveform'
Description-Content-Type: text/markdown

# jaxtfwaves
JAXTFwaves is the sibling project of [tfwaves](https://gitlab.in2p3.fr/lisa-apc/tfwaves) that is using JAX as backend.

# tfwaves
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.

## Installation

The core package is available on PyPI:

```bash
pip install jaxtfwaves
```

To install a specific plugin, use its named extra:

```bash
pip install "jaxtfwaves[sobhbwaveform]"   # SOBHB waveforms via ripplegw
# pip install "jaxtfwaves[emriwaveform]"  # EMRI waveforms (coming soon)
```

Or install all available plugins at once:

```bash
pip install "jaxtfwaves[plugins]"
```

## Contributing

### Development environment

We use [uv](https://docs.astral.sh/uv/) for dependency management.
First clone the repository on your machine and go in the directory:

```bash
git clone git@gitlab.in2p3.fr:lisa-apc/tfwaves.git
cd jaxtfwaves
```

Create the lockfile and synchronize dependencies (including development tools):

```bash
uv sync --all-extras --group dev
```

We recommend you install pre-commit hooks to detect errors before you even
commit.

```bash
uv run pre-commit install
```

Then you can run any script using 

```bash
uv run python your_script.py
```

Lint and format checks are handled with Ruff:

```bash
uv run ruff check src tests
uv run ruff format --check src tests
```

Alternatively, you can activate the virtual environment by running

```bash
source .venv/bin/activate
```
and deactivate it by just running

```bash
deactivate
```

### Alternative local installation

As an alternative to uv-managed environments, you can install the package in development mode when you are in the `jaxtfwaves` directory:

```bash
pip install -e .            # core only
pip install -e ".[plugins]" # core + plugins
```

## Publishing to PyPI

1. **Build** the package (from the repo root):

   ```bash
   uv build
   ```

2. **Check** the artifacts:

   ```bash
   uv run twine check dist/*
   ```

3. **Upload to TestPyPI** first:

   ```bash
   uv publish --publish-url https://test.pypi.org/legacy/ --token pypi-YOUR_TEST_TOKEN
   ```

   Verify the install:

   ```bash
   pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple jaxtfwaves
   pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "jaxtfwaves[plugins]"
   ```

4. **Upload to PyPI**:

   ```bash
   uv publish --token pypi-YOUR_TOKEN
   ```

5. **Tag the release**:

   ```bash
   git tag v0.1.0
   git push origin v0.1.0
   ```
