Metadata-Version: 2.1
Name: burst-waveform
Version: 0.1.1
Summary: A Python package for gravitational wave burst waveform
Home-page: https://git.ligo.org/yumeng.xu/setup.py
Author: Yumeng Xu
Author-email: The PycWB team <yumeng.xu@ligo.org>
Keywords: ligo,sine-gaussian,white noise burst,gravitational waves,burst,waveform model
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy

# Burst waveform

This package hosts the python version of the burst waveform used in coherentWaveBurst(cWB) search.

## Installation from source

```bash
make install
```

## Usage

The `Burst-Waveform` package provides three burst waveform models: `SineGaussian`, `SineGaussianQ`,
and `WhiteNoiseBurst`

The waveforms can be generated by calling the instance of the waveform model after initializing it with the desired
parameters.

For example, to generate a `SineGaussianQ` waveform,

```python
from burst_waveform.models import SineGaussianQ
from matplotlib import pyplot as plt

params = {
    "amplitude": 1.0,
    "frequency": 300.0,
    "Q": 9
}

model = SineGaussianQ(params)
t, strain = model()

plt.plot(t, strain)
plt.show()
```

For `WhiteNoiseBurst` waveform,

```python
from burst_waveform.models import WhiteNoiseBurst
import matplotlib.pyplot as plt

params = {
    'frequency': 300,
    'bandwidth': 50,
    'duration': 0.005,
    'inj_length': 1,
    'mode': 1
}

WNB = WhiteNoiseBurst(params)
t, wnb = WNB()

plt.plot(t, wnb)
plt.xlim(0.5 - 10 * params['duration'], 0.5 + 10 * params['duration'])
plt.show()
```
