Lets make a QPO lightcurve. The smallest CARMA model that can do QPOs is the CARMA(2,q) model. Here's an example -

``````

In [13]:

import math
import cmath
import numpy as np

import kali.carma

dt = 0.1
Rho = np.array([complex(-1.0/100.0, (2.0*math.pi)/50.0), complex(-1.0/100.0, -(2.0*math.pi)/50.0), -1.0/10.0, 1.0])
Theta = kali.carma.coeffs(2, 1, Rho)
print Theta
QPOLC.plot()

``````
``````

[ 0.02        0.01589137  0.01566871  0.15668706]

Out[13]:

``````
``````

In [10]:

``````
``````

Out[10]:

``````
``````

In [11]:

``````
``````

Out[11]:

``````

Now lets do everything with a higher order model CARMA(4,1).

``````

In [14]:

dt = 0.1
Rho2 = np.array([complex(-1.0/100.0, (2.0*math.pi)/50.0), complex(-1.0/100.0, -(2.0*math.pi)/50.0), complex(-1.0/400.0, (2.0*math.pi)/250.0), complex(-1.0/400.0, -(2.0*math.pi)/250.0), -1.0/10.0, 1.0])
Theta2 = kali.carma.coeffs(4, 1, Rho2)
print Theta2
QPOLC2.plot()

``````
``````

[  2.50000000e-02   1.66292717e-02   9.22149288e-05   1.01371774e-05
3.69536622e-05   3.69536622e-04]

Out[14]:

``````
``````

In [15]:

``````
``````

Out[15]:

``````
``````

In [16]:

``````
``````

Out[16]:

``````