In [1]:
import numpy as np
import matplotlib.pyplot as plt
from pyMagnetar import Magnetar

%matplotlib inline

In [2]:
# %%timeit
m = Magnetar(b"filters")

In [3]:
# %%timeit
m.setup(34.0, 2.0, 2.0, 1.0)

In [6]:
# %%timeit
t = np.arange(0.1, 300.0, 0.1)
# t = np.linspace(1.0, 100.0, 15)
g = m.flux(t, b"DES_g")
r = m.flux(t, b"DES_r")
i = m.flux(t, b"DES_i")
z = m.flux(t, b"DES_z")

In [9]:
plt.plot(t, g, label="g")
plt.plot(t, r, label="r")
plt.plot(t, i, label="i")
plt.plot(t, z, label="z")

plt.legend()


Out[9]:
<matplotlib.legend.Legend at 0x10edd19b0>

In [14]:
%%timeit
m.setup(34.0, 2.0, 2.0, 1.0)

t = np.arange(0.1, 150.0, 5)
g = m.flux(t, b"DES_g")
r = m.flux(t, b"DES_r")
i = m.flux(t, b"DES_i")
z = m.flux(t, b"DES_z")


7.47 ms ± 127 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)