# 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()
```